using: Load objects from packages

Description Usage Arguments Details Examples

Description

Loads objects contained in packages or the entire package

Usage

1
2
3
4
5

Arguments

...

names of objects to be loaded

Details

Given an object name, this function will make that object available in the current search path. If the name given names a package, the entire package will be added to the search path. If the name specifies an object within a package, only that object will be available in the search path. The namespace of the object's package will be loaded, so other objects from that package will be available if given a namespace prefix. Note that you can expose objects from packages that are not exported. This is generally a bad idea, except for purposes of debugging.

Package namespaces are loaded by calling loadNamespace with default arguments. If you need more control, manage package loading manually prior to calling using.

The function stop_using attempts to remove the object from the search path or an entire package. This is intrinsically less reliable for packages, so use with caution.

Examples

1
2
3
4
5
6
7
8
9
using(using::use)
list_using()
formals(use)
stop_using(use)
list_using()
using(my_use = using::use)
list_using()
formals(my_use)
stop_using(my_use)

thk686/using documentation built on May 31, 2019, 10:43 a.m.