dada2 installation issue. non-zero exit status

Hello
I am a beginner at R and would really appreciate some help!
I am trying to download dada2 using the following code and am encountering an error which I do not understand. I have tried googling previous answers but am still lost.
All help will be really appreciated.

I am using R 4.0.0 because the package was not available on my updated version

Thank you!

install.packages("devtools")
library("devtools")
devtools::install_github("benjjneb/dada2", ref="v1.16")

#The above code gives a warning and an error:

install.packages("dada2")
Installing package into ‘C:/Users/balfourn/OneDrive - scion/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

Error: Failed to install 'dada2' from GitHub:
(converted from warning) installation of package ‘C:/Users/balfourn/AppData/Local/Temp/RtmpwfZ7TO/file405072426c6c/dada2_1.16.0.tar.gz’ had non-zero exit status

I also tried the following:

'if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("dada2", version = "3.11")'

install.packages("dada2")

library(dada2); packageVersion("dada2")

#and got a different error

install.packages("dada2")
Installing package into ‘C:/Users/balfourn/OneDrive - scion/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
library(dada2); packageVersion("dada2")
Error in library(dada2) : there is no package called ‘dada2’

It might be an issue installing to OneDrive. You might have better luck installing to a system drive.

Thank you for your quick response! I somehow sorted it out, though I honesty don’t know how – it just started working.
Good to know Onedrive can be an issue.

Im so glad this community support platform exists.
Thank you:)

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.