Package Compatibility with R

Hey everyone,

Sorry if this is a really simple question, I'm a newcomer to R and struggling to find useful resources. I'm currently running R version 3.6 on an ARM mac. I'm trying to start working on this tutorial, but I'm having trouble with installing the necessary packages.

  1. vegan
  2. ggplot2
  3. spaa
  4. devtools
  5. EcolUtils
  6. biomformat

Previously, I was using R version 4.4.1, but this only let me install the first four packages, while the last two returned an error message saying that there was no version built for my R version. After looking at the github pages for them, I decided to use R 3.6 instead, but now only ggplot2 and spaa download properly. Vegan runs into the same error:

Warning in install.packages :
  package ‘~/Downloads/vegan_2.6-6.1.tar’ is not available (for R version 3.6.3)
Warning in install.packages :
  unable to access index for repository https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6:
  cannot open URL 'https://cran.rstudio.com/bin/macosx/el-capitan/contrib/3.6/PACKAGES'

while devtools ended up like this after 10 minutes:

Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
	‘/private/var/folders/zh/6x6yfjld2fb8vjw6rdwp010h0000gn/T/RtmpIQE1Bh/downloaded_packages’

Does anyone know how to get over these issues? There might be something I'm missing, I just don't understand why these packages won't install. Thanks in advance.

Looking at the GitHub pages of the last two packages, you should use the latest version of R and install vegan, ggplot2, spaa, and devtools. Then run

devtools::install_github("GuillemSalazar/EcolUtils")

if (!requireNamespace("BiocManager", quietly=TRUE))
    install.packages("BiocManager")
BiocManager::install("biomformat")
1 Like

In brief, do not use R 3.6, it is old, and CRAN mirrors does not have binary packages for it, only the cran-archive server, and many newer packages do not support it. R 3.6. also does not have an ARM build, so you are using it through Rosetta emulation, which makes it much slower.

Use R 4.4.1 or at least a recent version. You can download it from https://cloud.r-project.org/bin/macosx/ Alternatively, you can use GitHub - r-lib/rig: The R Installation Manager which will let you use multiple R versions, and select between them easily.

In any case, if you have package installation issues with R 4.4.1, then please show us the error messages you get and we can help.

1 Like

This worked perfectly, thanks!

This topic was automatically closed 7 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.