Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): there is no package called ‘magrittr’

Hi, i tried to install tidyverse and it give following error-
Error: package or namespace load failed for ‘tidyverse’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
there is no package called ‘magrittr’

However , when i tried to install ‘magrittr’ package and it gives somethings like that-
package ‘magrittr’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘magrittr’
Warning in install.packages :
problem copying F:\R\R-4.1.2\library\00LOCK\magrittr\libs\x64\magrittr.dll to F:\R\R-4.1.2\library\magrittr\libs\x64\magrittr.dll: Permission denied
Warning in install.packages :
restored ‘magrittr’

The downloaded binary packages are in
C:\Users\DELL_BVS\AppData\Local\Temp\RtmpM9C6et\downloaded_packages

Thank you!

It looks like you have an older version of {magrittr} installed and loaded.

Try restarting R and Rstudio and then try installing {magrittr}.

If you get the same error, it is possible that RStudio is loading a .Rdata file that is recreating an older environment. In that case it is a good idea to disable the automatic loading.

Tools > Global Options
Uncheck the"Restore .Rdata into Workspace at start-up" box

Hi, I have the error and try your ways as well. But it's still not working.
Do you have any suggestions? Thank you in advance.

Hi, welcome to the forum.

Can you post the complete error message. I think the output of

sessionInfo()

might also be helpful.

Sorry for the late reply, thank you for your help.

sessionInfo()
R version 4.3.0 (2023-04-21 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=English_Australia.utf8 LC_CTYPE=English_Australia.utf8
[3] LC_MONETARY=English_Australia.utf8 LC_NUMERIC=C
[5] LC_TIME=English_Australia.utf8

time zone: Australia/Sydney
tzcode source: internal

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] compiler_4.3.0 tools_4.3.0

This topic was automatically closed 21 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.