[R] Library control

David Winsemius dwinsemius at comcast.net
Wed Jul 25 02:02:21 CEST 2012


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



More information about the R-help mailing list