页次: 1
按照wiki配置的R语言环境
# ~/.Renviron
R_HOME_USER = ${HOME}/workspace/R
R_PROFILE_USER = ${HOME}/.Rprofile
R_LIBS_USER = ${HOME}/bin/R/packages
R_HISTFILE = ${HOME}/.Rhistory
#R_DEFAULT_PACKAGES = 'stats'
当前在bash用个人账户执行
Rscript --vanilla "ElementaryFactor.R"
会出现
Loading required package: RJDBC
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘RJDBC’
Loading required package: RSQLite
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘RSQLite’
Error in JDBC("com.microsoft.sqlserver.jdbc.SQLServerDriver", "/home/liuli/bin/jdbcDriver/sqljdbc4.jar") :
could not find function "JDBC"
Execution halted
${HOME}/bin/R/packages 下面是有RJDBC的,然后在root下安装RJDBC后就会解决这个问题。
说明执行个人账户 Rscript --vanilla "ElementaryFactor.R" 不会调用个人library下面的包,但进入R的命令行加载这个包或者在Rstadio里面不会出现这个状况。
离线
页次: 1