Rstudio not installing correct packages

The R for my RGUI is 4.0.2. But the version for Rstudio shows 3.3.2. I thought Rstudio used the installed version of R, 4.0.2. (Can't even find an installed R.3.3.2. Under programs in the control panel it only shows R for Windows 4.0.2.) This might be relevant for my problem: RStudio won't install the correct (up-to-date) packages. It shows:

[1] "C:/Users/bwcra/R/win-library/3.3"
[2] "C:/Program Files/Microsoft/R Client/R_SERVER/library"

But the RGUI shows:

[1] "C:/Users/bwcra/R/win-library/4.0" "C:/Program Files/R/R-4.0.2/library"

The RGUI packages are correct. Some of the R packages are not. Updating them doesn't help because, presumably, they're being updated from the wrong source?

The book "An R Companion to Applied Regression" requires the package "car":

install.packages(c("car", "effects", "knitr"), dependencies=TRUE)
You then run: library("car") and carWeb(setup=TRUE)

On the RGUI all this works fine. As it does in Rstudio on my Mac. But not on my Windows Rstudio, which presumably installs an older version of "car", from, presumably, an out-of-date source.
I've tried uninstalling and re-installing Rstudio (on Windows) but that doesn't fix the problem.

How do I get Rstudio "up-do-date" -- i.e, installing the same packages as RGUI? And, presumably, running the latest R version on my pc?


Within RStudio, go to the Tools menu (almost all the way to the right) and select "Global Options" (the bottom one). It should open to a screen to set your version of R.

Does that do it?

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.