.libPaths() RStudoi4.2.0

Dear RStudio users
I am using R.4.2.0 for windows.
After some windows updates I was no more able to install packages. I realised that RStudio had some problems in finding the paths (probably due to "ö"). So I decided to use .libPaths to change the folder of the R packages.

  • It seems that I was successfull as libPath provided me the new path.
  • However, there was still an error in nchar (homeDir): invalid multitypte string, element 1). Do you have any ideas do solve this error?

code

.libPaths()
[1] "C:/Rlibrary" "C:/Program Files/R/R-4.2.0/library"
Warning message:
In normalizePath(path.expand(path), winslash, mustWork) : path[1]="C:/Users/Sibylle St�ckli/Documents": Das System kann den angegebenen Pfad nicht finden
install.packages("ggplot2", dependencies = TRUE)
Installiere Paket nach ‘C:/Rlibrary’
(da ‘lib’ nicht spezifiziert)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.2/ggplot2_3.3.6.zip'
Content type 'application/zip' length 4122980 bytes (3.9 MB)
downloaded 3.9 MB

Paket ‘ggplot2’ erfolgreich ausgepackt und MD5 Summen abgeglichen

Die heruntergeladenen Binärpakete sind in
C:\Users\Sibylle Stöckli\AppData\Local\Temp\RtmpEjDCAw\downloaded_packages
Error in nchar(homeDir) : invalid multibyte string, element 1

It seems R is having an issue accessing your home directory. You could try to adapt the according environment variables. Please see this:

Another issue could be saving the required files in your default tempdir().

Here you can find some info on how to change the location of the tempdir():

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.