Google Analytics: Cant load SimDesign package in R Studio Desktop

As per course instructions, we are supposed to install the SimDesign package and load it, I was able to successfully do it in the posit cloud version, but when I tried it in the R Studio desktop version, there is a problem. The package installed successfully, but when i tried to load it with the library() function, the console showed an error -

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

I am new to R, can someone please help, I will be really grateful

That means that you did not install all of its dependencies correctly. One simple way to do so is to use the pak package. Install pak like this:

install.packages("pak", repos = sprintf(
  "https://r-lib.github.io/p/pak/stable/%s/%s/%s",
  .Platform$pkgType,
  R.Version()$os,
  R.Version()$arch
))

(Cf. All about installing pak. — Installing pak • pak)

Then call

pak::pkg_install("SimDesign")

Thankyou so much! It worked :slight_smile:

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