0

I need to install this package into R 3.5 so I can submit an R script that was created on that version. I have to do this via linux. After typing R35, I run install.packages('tidyverse') and get the folloing error:

Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
  namespace ‘vctrs’ 0.3.6 is being loaded, but >= 0.3.7 is required
ERROR: lazy loading failed for package ‘tidyr’
* removing ‘/ua/jwlorge/R/x86_64-pc-linux-gnu-library/3.5/tidyr’
ERROR: dependency ‘dtplyr’ is not available for package ‘tidyverse’
* removing ‘/ua/jwlorge/R/x86_64-pc-linux-gnu-library/3.5/tidyverse’

The downloaded source packages are in
        ‘/tmp/RtmpAHxP3R/downloaded_packages’
Warning messages:
1: In install.packages("tidyverse") :
  installation of package ‘vctrs’ had non-zero exit status
2: In install.packages("tidyverse") :
  installation of package ‘ellipsis’ had non-zero exit status
3: In install.packages("tidyverse") :
  installation of package ‘hms’ had non-zero exit status
4: In install.packages("tidyverse") :
  installation of package ‘pillar’ had non-zero exit status
5: In install.packages("tidyverse") :
  installation of package ‘tibble’ had non-zero exit status
6: In install.packages("tidyverse") :
  installation of package ‘dplyr’ had non-zero exit status
7: In install.packages("tidyverse") :
  installation of package ‘dbplyr’ had non-zero exit status
8: In install.packages("tidyverse") :
  installation of package ‘dtplyr’ had non-zero exit status
9: In install.packages("tidyverse") :
  installation of package ‘tidyr’ had non-zero exit status
10: In install.packages("tidyverse") :
  installation of package ‘tidyverse’ had non-zero exit status

I searched online and found other people who had this problem but none of the suggestions worked. I tried updating vctrs and rlang. This is the error I get when I try to re-install vctrs:

Error : .onLoad failed in loadNamespace() for 'rlang', details:
  call: NULL
  error: 'is_character' is not an exported object from 'namespace:rlang'
ERROR: lazy loading failed for package ‘vctrs’
* removing ‘/ua/jwlorge/R/x86_64-pc-linux-gnu-library/3.5/vctrs’

Re-installing rlang was successful but didn't solve the problem. I also found online that re-starting R solves the problem, but I am using linux and I am a bit new to it. I don't know how you would restart R35 in linux.

I have tidyverse succesfully installed in in another version but not in 3.5. Does anyone have an idea what is causing this issue? Thanks!

Johnny
  • 59
  • 5
  • R version 3.5 is 4+ years old. tidyverse has many packages plus dependencies, so perhaps one or more of these don't play well with the old version of R. Can you upgrade R? – user20650 Sep 05 '22 at 19:07
  • Is [this post](https://stackoverflow.com/questions/17082341/installing-older-version-of-r-package) helpful? – Rui Barradas Sep 05 '22 at 19:17
  • I need to submit r script that was already created by someone else using version 3.5, which is why I need to install the package to that version. He must've had the package installed successfully for that version. By upgrade R do you mean use a newer version? I need to use 3.5. – Johnny Sep 05 '22 at 19:34
  • Microsoft maintains old mirrors of CRAN here: https://mran.microsoft.com/timemachine . Set the date to match when the script was written, install all packages as of that date, and you might get lucky. – user2554330 Sep 05 '22 at 19:59
  • @RuiBarradas already mentioned the time machine indirectly, specifically this answer to the question he linked: https://stackoverflow.com/a/62722409/2554330 . – user2554330 Sep 05 '22 at 20:01
  • @RuiBarradas that posts looks like it would be helpful but I don't seem to have those functions in my R in linux for installing a previous version, and I don't know which version of tidyverse would be compatible for 3.5. I'm a bit new to linux. – Johnny Sep 05 '22 at 20:03
  • @user2554330 thanks for the comment. Is there anywhere that explains how to set the date for CRAN? I've never had to do that before and I'm a bit new to linux. – Johnny Sep 05 '22 at 20:07
  • To know which verssion of `tidyverse` to install, go to CRAN's [main page](https://cran.r-project.org/). There are links to older versions of R and archived packages. Choose versions with matching dates. You will find archived versions of the tidyverse [here](https://cran.r-project.org/src/contrib/Archive/tidyverse/) – Rui Barradas Sep 05 '22 at 21:13
  • @Johnny, see the link I posted. – user2554330 Sep 05 '22 at 21:34

0 Answers0