carpentries / workshop-template

The Carpentries Workshop Template
https://carpentries.github.io/workshop-template/
Other
235 stars 520 forks source link

Problems installing packages in R #315

Closed iglpdc closed 7 years ago

iglpdc commented 8 years ago

We had a couple of problems during a DC workshop today during the R session. I'm posting this here because it may be relevant. I was teaching so I missed some details.

The issue is that when trying to install a package (specifically dplyr) from RStudio, install.packages("dplyr") returns an error saying that the package is not available for this version of R.

This was happening on a brand new installation of R and RStudio from the links in the workshop page.

The problem seems to be that there was an older version of R installed in the computer and RStudio was picking this one up by default, instead of the newer. (You can check this with sessionInfo()). I think all the machines involved were running Windows.

Forcing RStudio to run the newer version of R fixed the problem. This post explains how to switch between R versions on RStudio and different operating systems.

Could someone with more experience on R confirm this, so we can add it to the wiki?

gvwilson commented 8 years ago

@fmichonneau any ideas?

fmichonneau commented 8 years ago

Yes, I have seen this before. I think having a link to the post @iglpdc mentions is a good idea. I don't have a lot of experience with this myself, as I only keep one version of R on my system at the time.

rgaiacs commented 8 years ago

@iglpdc Do you want to change something on the installation instructions?

iglpdc commented 7 years ago

I've just added the text above to the wiki. We can close this now.