partial installation of tidyverse on Windows on first installation of R and Rstudio

Hi: I'm teaching an introductory data science course, and many of my students who are Windows users report only a partial installation of the tidyverse package after installing R and RStudio for the first time. Unfortunately, I'm not familiar with the Windows context, so am not sure why so many are experiencing similar issues. If anyone could point me to resources that might help me troubleshoot what's going on, I'd be grateful.

Thanks,
David

Do they all get exactly the same error message? Could you share those error messages so we can see if there is a pattern or if they are isolated cases?

Tangentially and conversely, my Windows students seem to be okay, while my Mac students are getting the "there is no package 'broom'" error.

Compilation errors have been reported for broom on macOS and there is no binary version available yet, sadly this is just the way things are and have been for a long time, you just have to be patient and wait for the binaries to arrive.

Can my students and I install an old version of broom to be able to work with tidyverse?

In theory, you should be ok if you choose to install the older binary version instead of the newer source version when asked by the install.packages() function, but I can't test this since I'm not a mac user, maybe someone else can confirm this.

It occurred to me that my students and I do not use all of the tidyverse packages, so we are going to load dplyr, ggplot2, tidyr etc. individually.

@dsollberger I don't know if this is helpful, but I was just able to re-install tidyverse on my mac after removing the broom package, and broom 0.5.4 was installed without any problem. Maybe having your students do the same might work if there happens to be a version clash?

I'm not sure yet: I've asked them to send me the console output from executing install.packages('tidyverse'), and hopefully that will shed some light of the question. One thought I had was that the prompt "Do you want to install from sources packages which need compilation?" often comes up (although I can't tell what triggers it), and if students answer 'yes' I could imagine a failure resulting if there is no binary yet for the latest version of a package. Could that be an issue?

Compiling packages from source always brings higher chances of installation failure, if you want to take the easiest and safest path, always prefer the binary versions even if they are not on the latest version.

Should running install.packages('tidyverse', type = 'binary') take care of that?

Yes, but that is not always an option for every package out there, so I think is better to do it interactively, since sometimes there is no choice but to try to install from source.

On the other hand, learning to deal with installation problems is an important part of learning R so I think is a valuable learning experience anyways.

Thank, Andrés -- I'll follow up with more details if there's something systematic about the trouble my students are having with their installation on Windows.

Thanks again,
David

For teaching, have you considered using RStudio Cloud?

One only has to set up a single environment (workspace), and then share it with class attendees.

Thus one may focus on teaching than spend time preparing individual environments.

As a bonus, RStudio offers its cloud workspace for free currently!

Thanks, Ivan -- I do use it heavily for my courses, but most students prefer to do their work on a local instance of RStudio so they're not subject to the delays that can be introduced by working remotely.

Gotcha.

In this case, have you considered renv?

Similar concept to Python/Conda virtual environments; once you created a renv.lock (i.e., your environment snapshot), other users may restore your environment via that file with renv::restore().

Thanks, Ivan, I hadn't heard of renv, but it sounds like it might be exactly what I need!

Thanks again,
David

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.