Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

unlibrary

Unload a package


Description

A wrapper function to detach that removes a package from the search path, but takes a package name as input similar to library.

Usage

unlibrary(package)

Arguments

package

A package name, which may be specified with or without quotes.

Details

Unloads a package. This is just a wrapper for the detach function. However, the package argument is just the name of the package (rather than the longer string that is required by the detach function), and – like the library function – can be specified without quote marks. The unlibrary function does not unload dependencies, only the named package.

The name "unlibrary" is a bit of an abuse of both R terminology (in which one has a library of packages) and the English language, but I think it helps convey that the goal of the unlibrary function is to do the opposite of what the library function does.

Value

Identical to detach.

Warning

This package is under development, and has been released only due to teaching constraints. Until this notice disappears from the help files, you should assume that everything in the package is subject to change. Backwards compatibility is NOT guaranteed. Functions may be deleted in future versions and new syntax may be inconsistent with earlier versions. For the moment at least, this package should be treated with extreme caution.

Author(s)

Daniel Navarro

See Also

Examples

unlibrary( lsr )  # unload the lsr package
library( lsr )    # reload it

lsr

Companion to "Learning Statistics with R"

v0.5
GPL-3
Authors
Daniel Navarro
Initial release
2015-03-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.