0

我正在尝试安装 R Studio 包。我正在以“数据清理”用户的身份运行 R 这个用户

一些软件包是从本地源安装的:

if (!require("SparseM", lib=lib.path)) install.packages("/dc/R/p1/SparseM_1.7.gz", repos = NULL, type="source", lib=lib.path)

其他直接来自 R cran

if (!require("stringr", lib=lib.path)) install.packages("stringr", lib=lib.path, repos=url.cran)

这是安装包目录的样子:

    drwxrwxr-x  7 root         root  4096 feb  8 15:15 base64enc
    drwxrwxr-x  8 datacleaning users 4096 feb  8 15:11 bit
    drwxrwxr-x  9 root         root  4096 feb  8 15:19 bit64
    drwxrwxr-x  9 root         root  4096 feb  8 15:16 data.table
    drwxrwxr-x  6 root         root  4096 feb  8 15:15 evaluate
    drwxrwxr-x  9 root         root  4096 feb  8 15:15 foreign
    drwxrwxr-x 11 root         root  4096 feb  8 15:16 gdata
    drwxrwxr-x  8 root         root  4096 feb  8 15:16 gtools
    drwxrwxr-x  7 root         root  4096 feb  8 15:15 highr
    drwxrwxr-x 14 datacleaning users 4096 feb  8 15:15 knitr
    drwxrwxr-x  7 root         root  4096 feb  8 15:15 magrittr
    drwxrwxr-x 11 root         root  4096 feb  8 15:15 markdown
    drwxrwxr-x  7 datacleaning users 4096 feb  8 15:11 mime
    drwxrwxr-x  8 datacleaning users 4096 feb  8 15:16 plyr
    drwxrwxr-x 16 datacleaning users 4096 feb  8 15:16 Rcpp
    drwxrwxr-x  8 datacleaning users 4096 feb  8 15:16 reshape2
    drwxrwxr-x  6 datacleaning users 4096 feb  8 15:15 sendmailR
    drwxrwxr-x  8 datacleaning users 4096 feb  8 15:15 stringi
    drwxrwxr-x  9 root         root  4096 feb  8 15:15 stringr
    drwxrwxr-x  8 datacleaning users 4096 feb  8 15:11 xtable
    drwxrwxr-x  7 root         root  4096 feb  8 15:15 yaml

为什么已安装的软件包所有权变为 root?一些包依赖项正在尝试访问这些根包。但是后来我没有访问根包的权限。

也许我错过了关于 R 包安装的一些东西

4

0 回答 0