How do I tell install.packages() where to install a package?
I don't understand the difference between the lib and destdir arguments in install.packages()
According to documentation, lib is a
character vector giving the library directories where to install the packages. Recycled as needed. If missing, defaults to the first element of .libPaths() .
while destdir is the
directory where downloaded packages are stored. If it is NULL (the default) a subdirectory downloaded_packages of the session temporary directory will be used (and the files will be deleted at the end of the session).
It seems to me like both of these are the path where the package is installed. What is the difference?
Similarly, which does lib.loc in library() correspond to? That is, will the path given to lib.loc be the same as the path for lib or for destdir?