当我尝试从Linux机器上运行R时出错

时间:2017-10-18 06:32:48

标签: rstudio

helloworld.r

#!/usr/bin/Rscript
ds1 = data.frame(1,2,3,4,5,6,7,8,9)
install.packages("caTools", dependencies=TRUE)
str(ds1)

输出:

-bash-4.1$ ./helloworld.r
Installing package into ‘/usr/lib64/R/library’ (as ‘lib’ is unspecified)


 Warning in install.packages("caTools", dependencies = TRUE) :
  'lib = "/usr/lib64/R/library"' is not writable
  Error in install.packages("caTools", dependencies = TRUE) :
  unable to install packages
  Execution halted

0 个答案:

没有答案