Advertisement
Guest User

Untitled

a guest
Apr 25th, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.29 KB | None | 0 0
  1. checkfordir <- function(path){
  2.     return(isTRUE(file.info(path)$isdir));
  3. }
  4.  
  5. #because .libPaths() only appends paths, doesn't replace anything.
  6. setLibPaths <- function(newlibs){
  7.     newlibs <- newlibs[sapply(newlibs, checkfordir)]
  8.     assign(".lib.loc", newlibs, envir=environment(.libPaths));
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement