Based on a number of answers on the web, I've tried multiple approaches:
.libPaths():
[1] "/home/balter/conda/lib/R/library" "/home/balter/R"
> .library=""
> .library.site=c("")
> .libPaths()
[1] "/home/balter/conda/lib/R/library" "/home/balter/R"
> Sys.unsetenv("R_LIBS_SITE");Sys.unsetenv("R_LIBS");Sys.unsetenv("R_LIBS_USER")
> .libPaths()
> .libPaths()
[1] "/home/balter/conda/lib/R/library" "/home/balter/R"
> .libPaths("")
> .libPaths()
[1] "/home/balter/conda/lib/R/library"
> .libPaths("")
> .libPaths()
[1] "/home/balter/conda/lib/R/library"
> .library.site
[1] ""
> assign(".lib.loc", "")
> .libPaths()
[1] "/home/balter/conda/lib/R/library"
I would like to be able to set .libPaths
to empty, or at least exactly what I want it to be with no residuals.