statquant statquant - 7 months ago 22
R Question

How can I find where the package I loaded comes from

I want to programatically save some packages my script has loaded (I mean the actual directory).

I know doing

shows the paths where the packages can come from (though I could also load it from somewhere different).

Is there an already build function to get where a package that I loaded comes from ?


My solution would be: <- sessionInfo()

names.packages <- names($loadedOnly)


I hope this is what you are searching for.