R/inlib.R

Defines functions inlib

inlib <- function(lib, expr, addbaselib=TRUE){
  oldlib <- .libPaths();
  on.exit(
    setlib(oldlib)
  );
  if(isTRUE(addbaselib)){
    lib <- c(lib, dirname(system.file(package="base")));    
  }
  setlib(lib);
  return(force(expr));  
}
jeroenooms/apps documentation built on May 17, 2017, 6:17 p.m.