Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed Update to package install at 01-rstudio-intro.Rmd #868

Closed
wants to merge 0 commits into from

Conversation

isaac-jennings
Copy link
Contributor

Dear maintainers,

I am a SWC Instructor who regularly delivers this R workshop to researchers. Over the course of many workshops in 2023, there have been recurrent issues in relation to lazy loading, and dependency install failure when installing ggplot2 on some machines. 9/10 times, setting the dependencies flag to TRUE explicitly tends to resolve the issues encountered. The other 1/10 times are often new R users setting the library download location to a sync folder i.e. cloud storage (in my experience at least).

For your consideration, and best wishes.

@github-actions
Copy link

github-actions bot commented Oct 12, 2023

NOTE: This Pull Request (#868) was previously merged

github-actions bot pushed a commit that referenced this pull request Oct 12, 2023
@matthieu-bruneaux
Copy link
Contributor

Thank you very much for reporting this @isaac-jennings, and also for providing a work-around. It is always very helpful to have feedback from live workshops!

I am a bit reluctant at the moment about adding dependencies = TRUE in the learner material for the "ggplot2" installation, while not adding it for "plyr" nor for "gapminder". I feel this might come as a surprise to the learners, and we would need to add some explanations as to what this argument does and why it is needed in this particular case, but not in the others.

Another aspect is that the default behaviour of install.packages() is to fetch and install the dependencies in the "Depends", "Imports" and "LinkingTo" fields. Using dependencies = TRUE tells the function to also install dependencies from the "Suggests" field. For ggplot2, the difference in terms of the number of packages to install is quite big on a fresh R install:

  • install.packages("ggplot2") downloads 23 packages
  • install.packages("ggplot2", dependencies = TRUE) downloads 110 packages

which also makes me think that having install.packages("ggplot2", dependencies = TRUE) in the Learner View for all learners might not be the best solution (assuming that for most learners the ggplot2 install works fine without dependencies = TRUE).

An alternative could be to add the dependencies = TRUE work-around to the Instructor View only, so that learners who do not experience the issue are not surprised by those instructions but instructors could easily find the work-around to provide it during their workshop if needed. Mentioning the issue with sync folders could also be a very helpful addition to the Instructor View.

If you would like to update your pull request so that the work-around is only visible in the Instructor View, with maybe one or two sentences of explanations for the instructors, I would be happy to review it.

Finally, it would be nice to understand what is the cause of this error during ggplot2 installation, and if it is something which is likely to go away in the future or not. Would it be possible to provide some more details about the error message(s) occurring when installing ggplot2 on the problematic machines (if you remember about them or if you encounter them in future workshops)? I have not encountered this issue yet myself, so I was wondering if it was possible to narrow it down to a specific cause or maybe to a common denominator about the problematic machines (OS? R version? repository used for installation?).

Copy link
Contributor

@matthieu-bruneaux matthieu-bruneaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As explained in my comment on the PR, I would suggest moving this work-around to the Instructor View only, with a few extra sentences explaining the issue to the instructors and how to solve it if their learners encounter it during their workshop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants