Vincent Raoult
Vincent Raoult

Reputation: 21

Error in getExportedValue(pkg, name) : cannot open file '~/R/win-library/3.3/viridis/data/Rdata.rdb': No such file or directory

I'm trying to analyze some data using simmr. I've recently switched to using Rstudio, which makes life easier, but for some reason I'm now unable to plot figures using this package. Still able to analyze the output as before.

The error I get is:

Warning: Ignoring unknown aesthetics: height Error in getExportedValue(pkg, name) : cannot open file '~/R/win-library/3.3/viridis/data/Rdata.rdb': No such file or directory In addition: Warning message: In getExportedValue(pkg, name) : restarting interrupted promise evaluation

The data input are as follows:

mix = matrix(c(FB2_Bream$d13C, FB2_Bream$d15N), ncol=2)
colnames(mix) = c('d13C','d15N')
s_names = c("FBOM", "Mangrove", "Mangrove Epiphyte", "Salt Couch")
s_means = matrix(c(-23.56, -28.06, -24.96, -14.46, 4.53, 6.9, 7.36, .5), ncol=2)
s_sds = matrix(c(.91, .68, 5.3, .21, 3.47, 1.01, .55, .1), ncol=2)
c_means = matrix(c(1, 1, 1, 1, 3.4, 3.4, 3.4, 3.4), ncol=2)
c_sds = matrix(c(0,0,0,0,0,0,0,0), ncol=2)

simmr_in = simmr_load(mixtures=mix,
source_names=s_names,
source_means=s_means,
source_sds=s_sds,
correction_means=c_means,
correction_sds=c_sds)

plot(simmr_in,xlab=expression(paste(delta^13, "C (\u2030)",sep="")),
ylab=expression(paste(delta^15, "N (\u2030)",sep="")))

I can actually go and look in the viridis directory, and the Rdata.rdb file is actually there. There are no access issues that I can see, I have full admin rights on this PC. The viridis library is actually installed and loaded in Rstudio. I've even tried to install viridisLite, and that results in the error:

Error in FUN(X[[i]], ...) : cannot open file '~/R/win-library/3.3/viridis/data/Rdata.rdb': No such file or directory In addition: Warning message:

In FUN(X[[i]], ...) : restarting interrupted promise evaluation

I'm very confused because I'm doing exactly what I was doing in R. I've tried closing Rstudio and R and starting over, but I get the exact same problem. I've even uninstalled both R and Rstudio to no effect.

I'd be very grateful for any advice, this is my first post in stackoverflow, which has usually helped me get past any errors I run into.

Upvotes: 1

Views: 3055

Answers (2)

user13432850
user13432850

Reputation: 1

I have overcome this issue by running the script as administrator, as the files were in their directory, and the reason of the error in my opinion was that R could not access them because of a lack of permissions to do so.

Upvotes: 0

Vincent Raoult
Vincent Raoult

Reputation: 21

Ok, I've figured it out. Despite having administrator access, the problem was that for some reason RStudio had trouble accessing my Documents folder, which is partitioned under my job ID. I've since changed the library to C:/R and re-installed all the relevant packages. Problem solved!

I'm assuming there's some underlying issue with privileges that's unresolved and RStudio had some trouble with it. I'm still a bit flabbergasted that I had this problem in RStudio, but not in R.

Upvotes: 1

Related Questions