Hi everybody,
I'm having this problem but I am not sure what is the source of it.
Basically, when I try to load 'tidyverse', I get an error message telling me:
library(tidyverse)
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘pillar’
In addition: Warning message:
In dir.create(tempPath, recursive = TRUE) :
cannot create dir 'C:\Users????????? ????', reason 'Invalid argument'
I also tried to install 'pillar' but it did not work.
package ‘pillar’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\ÚÈÏÇáÑÍãä ÏáÇß\AppData\Local\Temp\RtmpwZl0du\downloaded_packages
Warning message:
In dir.create(tempPath, recursive = TRUE) :
cannot create dir 'C:\Users????????? ????', reason 'Invalid argument'
I would highly appreciate any help. I am also running R studio as administrator.
Thanks,
Could you also give us some info on your system setup (e.g.
Is this exactly what you see on your machine? (I just want to make sure nothing is getting lost in translation between your system and what's printed here)
Do other packages install correctly for you?
No, I think there is something wrong going on. For instance, we I try to load 'esquisse', i get this reply:
install.packages("esquisse")
also installing the dependency ‘ggthemes’
There is a binary version available but the source
version is later:
binary source needs_compilation
ggthemes 4.1.1 4.2.0 FALSE
package ‘esquisse’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\ÚÈÏÇáÑÍãä ÏáÇß\AppData\Local\Temp\Rtmpkl3XOS\downloaded_packages
installing the source package ‘ggthemes’
installing source package 'ggthemes' ...
** package 'ggthemes' successfully unpacked and MD5 sums checked
** using staged installation
Error in .read_description(dfile) :
file 'C:/Users/ÚÈÏÇáÑÍãä ÏáÇß/AppData/Local/Temp/RtmpWu6MuN/R.INSTALL436072f2630/ggthemes/DESCRIPTION' does not exist
ERROR: installing package DESCRIPTION failed for package 'ggthemes'
removing 'C:/Program Files/R/R-3.6.0/library/ggthemes'
Warning in install.packages :
installation of package ‘ggthemes’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\ÚÈÏÇáÑÍãä ÏáÇß\AppData\Local\Temp\Rtmpkl3XOS\downloaded_packages’
As for my system specifications:
Windows 10 (the latest update)
RStudio version: 1.2.1335
R version: 3.6.0
RStudio locale: [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"
R locate: [1] "LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252"
Neither in R. I tried installing "esquisse" for instance, but I got:
install.packages("esquisse")
Warning in install.packages("esquisse") :
'lib = "C:/Program Files/R/R-3.6.0/library"' is not writable
Error in install.packages("esquisse") :
unable to create ‘C:\Users<U+0639><U+0628><U+062F><U+0627><U+0644><U+0631><U+062D><U+0645><U+0646> <U+062F><U+0644><U+0627><U+0643>\OneDrive<U+0627><U+0644><U+0645><U+0633><U+062A><U+0646><U+062F><U+0627><U+062A>/R/win-library/3.6’
In addition: Warning message:
In dir.create(userdir, recursive = TRUE) :
cannot create dir 'C:\Users<U+0639><U+0628><U+062F><U+0627><U+0644><U+0631><U+062D><U+0645><U+0646> <U+062F><U+0644><U+0627><U+0643>', reason 'Invalid argument'
I also noticed that R cannot installed some packages although they are already installed such as ggplot2.
install.packages("ggplot2")
Warning in install.packages("ggplot2") :
'lib = "C:/Program Files/R/R-3.6.0/library"' is not writable
Error in install.packages("ggplot2") :
unable to create ‘C:\Users<U+0639><U+0628><U+062F><U+0627><U+0644><U+0631><U+062D><U+0645><U+0646> <U+062F><U+0644><U+0627><U+0643>\OneDrive<U+0627><U+0644><U+0645><U+0633><U+062A><U+0646><U+062F><U+0627><U+062A>/R/win-library/3.6’
In addition: Warning message:
In dir.create(userdir, recursive = TRUE) :
cannot create dir 'C:\Users<U+0639><U+0628><U+062F><U+0627><U+0644><U+0631><U+062D><U+0645><U+0646> <U+062F><U+0644><U+0627><U+0643>', reason 'Invalid argument'
I also tried to reinstall ggplot via RStudio and it worked well, but not in R.
Hmm, I'm not 100% sure what the problem is. I'm going to move this in to #general, since it doesn't seem to be specific to tidyverse packages. Hopefully someone there will have better advice.
I just managed to solve the problem basically by changing my computer's username. My computer username used to consist of two names (with space between them "Cat Cat". I just realized that and it caused many problems not only with R but also with MATLAB and Python, but once I changed my computer's username to one word only (or two words without space), this change was automatically reflected in the path. Therefore, all my problems with package installing were easily solved.
Above are the kinds of errors that occurred because of this problem.