statdivlab / corncob

Count Regression for Correlated Observations with the Beta-binomial
103 stars 22 forks source link

Cannot install the package #116

Closed NicolasLouw closed 3 years ago

NicolasLouw commented 3 years ago

Good day Firstly, thanks for making this package available. I think it will be really useful to help me analyze my data. I do however have a problem that might be very simple, but when I try to install the package, it fails to install every time. This is the error message that I get: "Installing package into ‘/Users/nicolas/Library/R/3.6/library’ (as ‘lib’ is unspecified) ERROR: dependency ‘phyloseq’ is not available for package ‘corncob’

I have tried installing phyloseq as well, but I still get this error message. If you have any advice on how I can install this package smoothly without any errors, I would kindly appreciate that.

Best Nicolas

bryandmartin commented 3 years ago

What error message prints out when you run this code?

source('http://bioconductor.org/biocLite.R') biocLite('phyloseq')

NicolasLouw commented 3 years ago

Hi, thanks for getting back to me. I get the following error messages: Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install

biocLite('phyloseq') Error in biocLite("phyloseq") : could not find function "biocLite"

bryandmartin commented 3 years ago

Oh sorry about that, please try the following:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install(version = "3.12")
BiocManager::install(c("phyloseq"))

After this is done, try install.packages("corncob") and let me know what, if any, error persists.

NicolasLouw commented 3 years ago

Thank you so much! I ran that code and managed to install and activate corncob.

Best Nicolas

bryandmartin commented 3 years ago

Great, for posterity purposes and anyone reading this in the future, the problem was that phyloseq was not installed. Installing Bioconductor packages can be a bit finicky, but they update their install instructions on this webpage: https://bioconductor.org/install

Follow the instructions there to first install phyloseq, then corncob should install no problem.