Tidyverse etc. successfully installed but unable to open with library(tidyverse) - could not be found

Please help. I am new to R & R studio and have installed it several times with the system defaults. I can install the tidyverse and plyr etc but am unable to use them. When I type library(tidyverse) etc. I get an error message . . . load failed for 'tidyverse' . . . unable to load shared object 'C:/Program Files.R/R-4..2.1/library/stats/libs/x64/stats.dll': Load library failure: The specified module could not be found.

Could this be a permissions / admin rights problem? Stats.dll exists in that location. Why is it wanting to look at Stats.dll when I want to load the tidyverse? So very confusing just now. I'd really appreciate some help.

It seems that downloaded packages are being saved to two different locations: [1] C:/Program Files/R/R-4.2.1/library

and [2] C:/Users/geg30wk/App Data/Local/R/win-library/4.2

I assume this is an issue. How can I fix this so all packages install to the same place and can be found and loaded.

The stats package is part of the base R distribution, have you updated your R version recently? I would try uninstalling R (including the system level package library) and reinstalling it in case I has get corrupted somehow.

It is possible but it would be rare, since by default all users have read permissions on it

Because stats is a dependency for `tidyverse, meaning it uses functions from it.

The first one is the system level package library, base R packages are located there, and the second location is your user level package library, if not specified otherwise, any additional package gets installed there.

Thankyou Andresrcs, much appreciated. cheers

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.