Frequent errors when teaching R course in RStudio

I'm teaching an intro to R course this week, and we've been plagued by 3 errors that I don't quite understand well enough to deal with.

For some participants, loading tidyverse in an odd order returns this error:

Error in completeSubclasses(classDef2, class1, obj, where) : 
  trying to get slot "subclasses" from an object of a basic class ("NULL") with no slots
Error: package or namespace load failed for ‘tidyverse’:
 .onLoad failed in loadNamespace() for 'dbplyr', details:
  call: setClass(cl, contains = c(prevClass, "VIRTUAL"), where = where)
  error: error in contained classes ("character") for class “ident”; class definition removed from ‘dbplyr’

Other participants get this error when trying to load various packages:

Error: package or namespace load failed for ‘ggplot2’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
 namespace ‘rlang’ 1.0.2 is already loaded, but >= 1.0.3 is required

Finally, this message pops up when some participants open RStudio:

Error in .rs.parsePackageDependencies(contents, extension) : 
  object 'partition_yaml_front_matter' not found

I've found various temporary fixes for some of these ((1) load tidyverse before any other libraries, (2) re-install rlang 1.0.4 from source, (3) close all tabs in RStudio, close Rstudio, reopen Rstudio. I can find some GitHub issues for these, but are there plans to resolve these soon? The constant difficulties just doing a single thing in a script has been a little demoralizing, and it's hard to get people excited about R when there are so many issues and SPSS just works out of the box...

thanks!

The second error will go away if they reinstall rlang, as you suggest. Having a package fail to load with this kind of error message is not all that uncommon. The yaml thing is a known bug. See Error on opening RStudio.

As for the comparison with SPSS, the people who build R and who build RStudio do things that are brilliant. Sometimes though, the mundane gets less attention. The money one pays for SPSS goes in part to paying people for boring bug fixes.

Thanks! Good to know

I should clarify I am so so appreciative of the folks at a rstudio. I suppose I’m struggling with wanting to be an advocate for R and the the rstudio suite of packages (because I know how useful they are) when we get bogged down in errors like this immediately on startup. It’s just not a good first impression for students.

See here for more details on the last of the issues you referenced (re: partition_yaml_front_matter): Error in .rs.parsePackageDependencies(contents, extension) : object 'partition_yaml_front_matter' not found after update to R 4.2.1 · Issue #11552 · rstudio/rstudio · GitHub

tl;dr -- it was fixed a month ago and will be rolled out soon. We do fix bugs, even boring ones, but we're a small team and it sometimes takes longer than we'd like. Very much appreciate your support!

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.