【发布时间】:2020-10-22 09:02:01
【问题描述】:
我正在尝试从 Ubuntu 运行 R 脚本。 R 脚本使用 vcfR 库:
install.packages("vcfR")
library("vcfR")
vcf.rout<-"/mnt/c/Users/PC/Documents/aDNA/haplotypes.vcf"
vcf<-read.vcfR(vcf.rout)
当我在 R 中运行脚本时,它运行良好, 但是当我在 Ubuntu 中运行脚本时,我得到了这个错误:
batelziv@DESKTOP-PGCKNUM:~$ Rscript /mnt/c/Users/PC/Documents/aDNA/Rs/unt1.R <br />
Installing package into ‘/usr/local/lib/R/site-library’<br />
(as ‘lib’ is unspecified)<br />
Warning in install.packages("vcfR") :<br />
'lib = "/usr/local/lib/R/site-library"' is not writable<br />
Error in install.packages("vcfR") : unable to install packages<br />
Execution halted
我还尝试在没有库相关行的情况下运行脚本:
library("vcfR")
vcf.rout<-"/mnt/c/Users/PC/Documents/aDNA/haplotypes.vcf"
vcf<-read.vcfR(vcf.rout)
我得到:
Error in library("vcfR") : there is no package called ‘vcfR’
Execution halted
为什么 Ubuntu 不能使用已经安装的软件包?
为什么安装时遇到问题?
【问题讨论】:
标签: r ubuntu windows-subsystem-for-linux vcf-vcard