Problem with installing DESeq2 and EdgeR

Hi I am new to R Studio. Recently I tried to use the following commands for instillation of DESeq2 and EdgeR.
library(edgeR)
library(DESeq2)
Unfortunately, both commands are giving an error and aren't executed properly. Can anyone please suggest how to troubleshoot this problem.

Thanks
Aftab

The library() function is used to attach a package that you've already installed. To install a package you use install.packages().

Thanks Mara,

I tried to use the command install.packages(DESeq2) or (edgeR). I am getting a warning message.
package ‘DESeq2’ is not available (for R version 3.4.1)
package ‘edgeR’ is not available (for R version 3.4.1)
Is there anyway to troubleshoot this problem ?
/Aftab

Also I am getting a message, when I try to execute the > library(edgeR) command.

library(edgeR)
Error: package ‘edgeR’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version
In addition: Warning message:
package ‘edgeR’ was built under R version 3.5.1

R version 3.5+ has different internals from earlier versions of R (3.4., 3.3., etc). What version of R are you running? You might consider upgrading to >= 3.5.0, since package binaries are now being built for this version of R. You can download the latest version (3.5.1) or older versions from here.

1 Like

edgeR and DESeq2 are Bioconductor packages, so they can’t be installed from CRAN using the usual install.packages() method. Please see their Bioconductor pages for installation instructions:

If you haven’t used Bioconductor packages before, it’s also worth making sure you understand how the Bioconductor package, repository and additional packages work, and how things differ from regular R in Bioconductor-land. Start here: https://bioconductor.org/install/

It’s especially important to make sure that you are running “matching” releases of R and Bioconductor when using Bioconductor packages. Unless you have a very good reason for running an older version of R (and understand how to match that to the appropriate Bioconductor release and package versions), I’d strongly recommend updating R to the latest version and reinstalling Bioconductor (from the instructions above) before going further.

2 Likes

Thanks I will follow your instruction, hope this time it will work :slight_smile:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.