简体   繁体   English

R包'biomod2'在执行绘图功能时找不到文件

[英]R package 'biomod2' cannot find file when executing plot function

I am attempting to use the plot() function in the biomod2 package, following a vignette here ( http://finzi.psych.upenn.edu/usr/share/doc/library/biomod2/doc/Simple_species_modelling.pdf ). 我试图在biomod2包中使用plot()函数,遵循这里的插图( http://finzi.psych.upenn.edu/usr/share/doc/library/biomod2/doc/Simple_species_modelling.pdf )。 Below is the error I am getting: 以下是我得到的错误:

getwd() 
# [1] "/home/gjanzen/Documents/Hufford/Drought/Data/Layers"
plot(myBiomodData) 

Error in getExportedValue(pkg, name) : cannot open file '~/R/x86_64-pc-linux-gnu-library/3.3/viridisLite/data/Rdata.rdb': No such file or directory In addition: Warning message: In getExportedValue(pkg, name) : restarting interrupted promise evaluation getExportedValue(pkg,name)出错:无法打开文件'〜/ R / x86_64-pc-linux-gnu-library / 3.3 / viridisLite / data / Rdata.rdb':没有这样的文件或目录另外:警告信息:In getExportedValue(pkg,name):重新启动中断的promise评估

I have confirmed that the Rdata.rdb exists, in the following directory: 我已确认Rdata.rdb存在于以下目录中:

f <- file.choose()
f 
# [1] "/home/gjanzen/R/x86_64-pc-linux-gnu-library/3.3/viridisLite/data/Rdata.rdb"

So, to me, it looks like the plot() function is looking in the wrong place. 所以,对我来说,看起来plot()函数看起来错误的地方。 How can I change where this function looks for Rdata.rdb ? 如何更改此函数查找Rdata.rdb Can I alter the path somehow? 我可以以某种方式改变路径吗? Or would changing my working directory fix this? 或者会改变我的工作目录修复此问题?

PS - This is my first post on Stack Overflow, so please forgive any mistakes in etiquette, and/or feel free to point them out to me so that I do not repeat them. PS - 这是我关于Stack Overflow的第一篇文章,所以请原谅礼仪中的任何错误,并且/或者随意指出它,以便我不再重复它们。

I think that the first thing to try is to reinstall the package viridisLite that seems to be the one that is causing troubles. 我认为首先要尝试的是重新安装看起来viridisLite导致麻烦的包viridisLite

install.packages('viridisLite', dep = TRUE)

If this not solves the issue you should try to open a new plotting device threw x11() to check if the issue is not coming from the R (resp. RStudio) plotting device itself. 如果这不能解决问题,你应该尝试打开一个新的绘图设备投掷x11()来检查问题是否来自R(resp.RStudio)绘图设备本身。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM