I need to use tidyverse for which I need rlang. I have rlang version 0.4.0. tidyverse needs version 0.4.1. So I tried to update. But every time following error shows up.
Warning in install.packages :
cannot remove prior installation of package ‘rlang’
Warning in install.packages :
problem copying C:\Users\kuldeep\Documents\R\win-library\3.6\00LOCK\rlang\libs\x64\rlang.dll to C:\Users\kuldeep\Documents\R\win-library\3.6\rlang\libs\x64\rlang.dll: Permission denied
Updating didn't work, no matter what I did.
So I removed rlang totally from my R and reinstalled again. That worked. I shouldn't have to do this though. I still dont know why I could not update.
I had the exact same issue just today. Running Rstudio with administrator rights did not solve the issue.
With me the problem was that my Rprofile loaded "usethis", "devtools", and "testthat" on startup. One or more of these packages loads "rlang", and this prevented "rlang" from being updated.
I solved it like this:
file.edit(file.path("~", ".Rprofile"))
Comment out all the loaded packages.
Restart session install.packages("rlang")