I have installed R-2.5.1 on my linux machine (Ubuntu LTS 6.01) by compiling the source. I have no problem to install packages on my local folder,
/home/flash/R_LIBS And I have no problem to load the package inside of R. for example, >library(cluster) However, when I'm trying to run batch command, for example, $R CMD BATCH work1.r work1.out ( work1.r file begins with library commands, like) library(cluster) ...... then I have the following error (copied from work1.out) > library(cluster) Error in library(cluster) : there is no package called 'adapt' Execution halted I checked the environment variables. > options("lib") $lib [1] "/home/flash/R_LIBS" > Sys.getenv("R_LIBS") R_LIBS "~flash/R_LIBS" In shell, env returns many variables and I have R_LIBS=/home/flash/R_LIBS:/usr/local/lib64/R/library. The only way to avoid this problem is to copy cluster directory from /home/flash/R_LIBS to /usr/local/lib64/R/library/ . How can I fix this problem? (or do I have to copy package directory whenever I install new one?) Thanks in advance.. Flash. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.