You need to update package rlang
. But in order to update it, you must end your R session.
When rlang
namespace is already loaded, the shared library rlang.dll
is locked and to try to update the package will fail with a warning:
install.packages('rlang')
Installing package into 'C:/Program Files/R/R-4/site-library'
(as 'lib' is unspecified)
trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.2/rlang_1.0.6.zip'
Content type 'application/zip' length 1574793 bytes (1.5 MB)
==================================================
downloaded 1.5 MB
package 'rlang' successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package 'rlang'
Warning: restored 'rlang'
The downloaded binary packages are in
C:\Users\ruipb\AppData\Local\Temp\RtmpSoI8r3\downloaded_packages
Warning message:
In file.copy(savedcopy, lib, recursive = TRUE) :
problem copying C:\Program Files\R\R-4\site-library\00LOCK\rlang\libs\x64\rlang.dll to C:\Program Files\R\R-4\site-library\rlang\libs\x64\rlang.dll: Permission denied
This is valid for RGui and for RStudio. Close RGui or RStudio, open a terminal window and run
R -q -e "install.packages('rlang')"