I am a recent R user. So far I have been able to install packages and upload them with no problem.
Today I have been unsuccessfully trying to install any package. As an example I copied belowed what it shows me. I tried to install "rlang" , rtools40", nothing works.
library(dplyr)
Error: package or namespace load failed for ‘dplyr’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/Cátia Nascimento.LAPTOP-S6SKQLC4/Documents/R/win-library/4.0/rlang/R/rlang.rdb': No such file or directory
Apparently the package rlang is not (correctly) installed.
I know you said you tried to do this but try again with install.packages("rlang")
If that does not succeed then which messages do you get?
If you see that rlang is already present in your library folder
then close R and remove it manually from this folder.
The location of the library folder can be found with .libPaths() .
And then install again.
As an aside: I think there is no package called rtools40 .
The toolset rtools40 is only needed when you want to compile packages or R itself from source.
I did as you said (delete manually) and tried to reinstall. It still doesn't work.
library(rlang)
Error: package or namespace load failed for ‘rlang’ in get(Info[i, 1], envir = env):
cannot open file 'C:/Users/Cátia Nascimento.LAPTOP-S6SKQLC4/Documents/R/win-library/4.0/rlang/R/rlang.rdb': No such file or directory
install.packages("rlang")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
R is having problems with non-ASCII characters in your windows user name, try installing to the system level package library instead or change your user name