1

I've encountered the following error while trying to do some basic introductory exercises to familiarize myself with this package.

library(ggplot2)

I then get this error code at this point

Error: package or namespace load failed for ‘ggplot2’: .onLoad failed in loadNamespace() for 'rlang', details: call: readRDS(nsInfoFilePath) error: unknown input format

I've manually verified the package's installation and directory but I still get this error.

Any insights? I feel like I'm missing something extremely basic here.

user438383
  • 5,716
  • 8
  • 28
  • 43
  • 1
    The error mentions the `rlang` package, perhaps try reinstalling that with `install.packages("rlang")` – Gregor Thomas Sep 14 '21 at 20:16
  • Please choose a title which would be useful for others with the same issue. Thank you. – user438383 Sep 14 '21 at 20:34
  • It doesn't have an accepted answer, but otherwise, this question seems to be a [duplicate of that one asked here](https://stackoverflow.com/questions/59270923/ggplot2-fails-to-load-with-rlang-package-error). As @GregorThomas noted, the error refers to `rlang`. Try installing / updating `rlang` separately, then update and load `ggplot2`. – chemdork123 Sep 14 '21 at 20:39
  • @Gregor Thomas I tried installing "rlang" and attempted library (rlang) and got a new error: .onLoad failed in loadNamespace() for 'rlang', details: call: readRDS(nsInfoFilePath) error: unknown input format – Samuel Lang Sep 14 '21 at 20:45
  • What OS and R version are you using? It sounds like something very unusual happened to your R library. See this question for the same error: https://stackoverflow.com/questions/6473831/readrdsfile-in-r – MrFlick Sep 14 '21 at 21:00
  • @MrFlick Win10, the latest R and Rstudio for x64 downloaded from the website – Samuel Lang Sep 14 '21 at 21:20
  • I know this sounds like silly advice, but have you tried quitting and restarting? – camille Sep 14 '21 at 22:05
  • 1
    Also, ensure you library directory is not on a shared drive or (if using Win10) OneDrive. R doesn't behave very well sometimes when libraries are on shared drives. Restarting with a clean R session (no extra packages loaded) is also suggested. – chemdork123 Sep 15 '21 at 01:43
  • https://stackoverflow.com/questions/69073165/r-many-package-imports-have-issues-related-to-pillar is unanswered, but suggests https://stackoverflow.com/questions/57762660/r-cannot-find-llapack-cannot-find-lblas – Joe Sep 15 '21 at 06:25
  • @camille I did indeed. A clean uninstall and reinstall seemed to solve my woes. I also manually created a library directory in my R folder which seemed to help? – Samuel Lang Sep 15 '21 at 18:41

0 Answers0