cannot load packages, though it is installed

After I installed ggplot2 I wanted to load the pckage. I get the below:

library(ggplot2)
Error: package or namespace load failed for ‘ggplot2’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/Tamás/Documents/R/win-library/4.0/rlang/R/rlang.rdb': No such file or directory

Rlang.rdb is where it should be, so I have no clue why r says No such ffile or direcctory. I tried to un- and reinstall my R and RStudio. I says the same. It would be kind if someone could advise.

Regards, Tamas

Do you experience this problem only with ggplot2? Or with all other packages?

What about other versions of R? Do you have this problem with R-3.x?

R is having problems with non-ASCII characters in your windows user name, either change your username or install into the system level package library instead.

Thank you for your respone. To answer your question, I tried different packages. From C:\Users\Tamás\Documents\R\win-library\4.0: magrittr and withr could be loaded, but ellipsis, crayon, tibble could not be loaded. From my C:\Program Files\R\R-4.0.0\library all packages could be loaded: class, lattice, splines, MASS.

Thank you for your response. The interesting is the error is not consistent. I tried different packages. From C:\Users\Tamás\Documents\R\win-library\4.0: magrittr and withr could be loaded, but ellipsis, crayon, tibble could not be loaded. From my C:\Program Files\R\R-4.0.0\library all packages could be loaded: class, lattice, splines, MASS.

How can set R or RStudio to install into the system level package library?

Hi in addition to trying different packages. I reinstalled my R by v 3.6.3. All packages could be loaded I had problem with. Br, Tamas

You can change the defaul values by setting your R_LIBS_SITE environmental variable on a .Reviron or .Rprofile file

# In .Renviron file you can set it by adding this line
R_LIBS_SITE="C:\\Program Files\\R\\R-4.0.0\\library"

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