使用bash脚本在R中安装库的权限错误 [英] Permissions-error using bash-script to install a library in R

查看:64
本文介绍了使用bash脚本在R中安装库的权限错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Bash脚本中运行名为CNV-Seq的软件,但是我没有运行以下命令的权限:

I am running a software called CNV-Seq in a Bash script but, I do not have permission to run the following command:

R CMD INSTALL cnv/

错误是

* installing to library '/share/apps/r/3.2.2/intel/lib64/R/library'
Error: ERROR: no permission to install to directory '/share/apps/r/3.2.2/intel/lib64/R/library'

我如何在未获得许可的情况下解决此问题.

How can I solve this problem without gaining permission.

推荐答案

一种方法是创建执行R脚本的bash脚本.因此,R脚本将包含:

One approach is creating the bash script that executes R script. So, the R script will contain:

install.packages("package_name")

将其另存为 xyz.r

,bash脚本将包含:

and the bash script will contain:

R -f path_to/xyz.r

将其另存为 abc .

像这样运行bash脚本:

Run the bash script like this:

bash abc

这篇关于使用bash脚本在R中安装库的权限错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆