All, 1. Is there a command that tells you what libraries are loaded? 2. How do you remove a library that has been loaded? 3. If you have loaded a library that masks previously loaded objects, how can you tell which object is being run? In Matlab, I would run "which f" to determine the location of the file f that will be run. Is there a similar procedure in R? David. -- View this message in context: http://r.789695.n4.nabble.com/Library-control-tp4637327.html Sent from the R help mailing list archive at Nabble.com.
Library control
3 messages · David Arnold, michael.weylandt at gmail.com (R. Michael Weylandt, David Winsemius
They are called packages, not libraries.
On Jul 21, 2012, at 5:19 PM, darnold <dwarnold45 at suddenlink.net> wrote:
All, 1. Is there a command that tells you what libraries are loaded?
Loaded is a fluid idea** in a namespace world, but search() will let you know what's on the search path (accessible to you)
2. How do you remove a library that has been loaded?
detach() can do it, but there might be lingering effects. The only true way is to restart your session.
3. If you have loaded a library that masks previously loaded objects, how can you tell which object is being run? In Matlab, I would run "which f" to determine the location of the file f that will be run. Is there a similar procedure in R?
Not exactly, but take a look at conflicts() and the :: operator. Michael **Well, loading is a particular step in the package management process, but probably not what you are thinking of.
David. -- View this message in context: http://r.789695.n4.nabble.com/Library-control-tp4637327.html Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
3 days later
On Jul 21, 2012, at 3:35 PM, R. Michael Weylandt wrote:
They are called packages, not libraries. On Jul 21, 2012, at 5:19 PM, darnold <dwarnold45 at suddenlink.net> wrote:
All, 1. Is there a command that tells you what libraries are loaded?
Loaded is a fluid idea** in a namespace world, but search() will let you know what's on the search path (accessible to you)
There is also unloadNamespace() which may be more complete, although I do not think complete sanity is guaranteed.
another david. > > >> >> 2. How do you remove a library that has been loaded? > > detach() can do it, but there might be lingering effects. The only > true way is to restart your session. > >> >> 3. If you have loaded a library that masks previously loaded >> objects, how >> can you tell which object is being run? In Matlab, I would run >> "which f" to >> determine the location of the file f that will be run. Is there a >> similar >> procedure in R? >> > > Not exactly, but take a look at conflicts() and the :: operator. > > Michael > > **Well, loading is a particular step in the package management > process, but probably not what you are thinking of. > >> David. >> >> David Winsemius, MD