To add specified library paths in devtools
, we need to use with_libpaths()
Arguments for with_libpaths()
are, with_libpaths(new, code)
Following is an example for using with_libpaths()
,
library(devtools)
with_libpaths(new = "/usr/lib/R/site-library/", install_github('rCharts', 'ramnathv'))
Courtesy: Hadley, here :)
And other than with_libpaths()
, there are more options for in devtools::with_something()
in_dir: working directory
with_collate: collation order
with_envvar: environmental variables
with_libpaths: library paths, replacing current libpaths
with_lib: library paths, prepending to current libpaths
with_locale: any locale setting
with_options: options
with_path: PATH environment variable
with_par: graphics parameters
More explanations here
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…