set_lib_dir() specifies where packages will be downloaded to.
get_lib_dir() returns this
clear_lib_dir() deletes all downloaded packages.
1 2 3 4 5
Path to a directory, or
Logical. Try to create the directory if it doesn't exist.
lib_dir is set to
NULL, a subdirectory of
tempdir() will be used.
lib_dir will be normalized via
The package cache is under the directory specified by
or, if that is unset, in a per-session temporary directory. You should use
to change this rather than setting the option directly. Within this directory, subdirectories
are named like
longurl-0.3.0. Within these subdirectories are
the actual installed libraries. So,
lib_dir is not appropriate for passing to functions like
library. To load a library from the cache yourself,
library("blah", lib.loc = file.path(get_lib_dir(), "blah-0.1.0")).
set_lib_dir invisibly returns the old library location, or
NULL if none was set in options.
get_lib_dir returns the actual library location, whether or not an option has been set.
clear_lib_dir invisibly returns TRUE if all files and directories could be removed, FALSE otherwise.
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.