R/setLibPaths.R

Defines functions checkfordir setLibPaths

checkfordir <- function(path){
	return(isTRUE(file.info(path)$isdir));
}

#because .libPaths() only appends paths, doesn't replace anything.
setLibPaths <- function(newlibs){
	newlibs <- newlibs[sapply(newlibs, checkfordir)]
	assign(".lib.loc", newlibs, envir=environment(.libPaths));
}
jeroenooms/opencpu-legacy documentation built on May 19, 2019, 6:15 a.m.