Prepend/append paths to the library path list, using .libPaths
.
add_lib(..., append = FALSE)
... | paths to add to .libPath |
---|---|
append | logical that indicates that the paths should be appended rather than prepended. |
This function is meant to be more convenient than .libPaths
, which requires
more writing if one wants to:
sequentially add libraries;
append and not prepend new path(s);
keep the standard user library in the search path.
#> [1] "/home/renaud/Documents/R-packages/pkgmaker/docs/reference" #> [2] "/usr/local/lib/R/site-library" #> [3] "/usr/lib/R/site-library" #> [4] "/usr/lib/R/library"#> [1] "/tmp/RtmpIQNZAJ" "/usr/local/lib/R/site-library" #> [3] "/usr/lib/R/site-library" "/usr/lib/R/library"#> [1] "/tmp/RtmpJs7h8M/temp_libpath75ed85ee0ea45" #> [2] "/home/renaud/R/x86_64-pc-linux-gnu-library/4.0" #> [3] "/usr/local/lib/R/site-library" #> [4] "/usr/lib/R/site-library" #> [5] "/usr/lib/R/library"#> [1] "/home/renaud/Documents/R-packages/pkgmaker/docs/reference" #> [2] "/usr/local/lib/R/site-library" #> [3] "/usr/lib/R/site-library" #> [4] "/usr/lib/R/library"#> [1] "/home/renaud/Documents/R-packages/pkgmaker/docs/reference" #> [2] "/tmp/RtmpJs7h8M/temp_libpath75ed85ee0ea45" #> [3] "/home/renaud/R/x86_64-pc-linux-gnu-library/4.0" #> [4] "/usr/local/lib/R/site-library" #> [5] "/usr/lib/R/site-library" #> [6] "/usr/lib/R/library"#> [1] "/tmp/RtmpIQNZAJ" #> [2] "/home/renaud/Documents/R-packages/pkgmaker/docs/reference" #> [3] "/tmp/RtmpJs7h8M/temp_libpath75ed85ee0ea45" #> [4] "/home/renaud/R/x86_64-pc-linux-gnu-library/4.0" #> [5] "/usr/local/lib/R/site-library" #> [6] "/usr/lib/R/site-library" #> [7] "/usr/lib/R/library"show( add_lib('..', append=TRUE) )#> [1] "/tmp/RtmpIQNZAJ" #> [2] "/home/renaud/Documents/R-packages/pkgmaker/docs/reference" #> [3] "/tmp/RtmpJs7h8M/temp_libpath75ed85ee0ea45" #> [4] "/home/renaud/R/x86_64-pc-linux-gnu-library/4.0" #> [5] "/usr/local/lib/R/site-library" #> [6] "/usr/lib/R/site-library" #> [7] "/usr/lib/R/library" #> [8] "/home/renaud/Documents/R-packages/pkgmaker/docs"