Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R How to install package 'graph'?

The package graph isn´t available on CRAN anymore. I found that it has moved to Bioconductor, see

Bioconductor - graph

But actually, if I try to run the commands they advise to run

install.packages("BiocInstaller")
source("http://bioconductor.org/biocLite.R")
biocLite("graph")

I get the error that even the BiocInstaller is not available for the latest R version 3.4.2

How can I install this package?

like image 477
WinterMensch Avatar asked Nov 02 '17 11:11

WinterMensch


People also ask

Can I install all packages in R?

Any package on CRAN can be installed using the install. packages() function. You can install multiple packages by passing a vector of package names to the function, for example, install. packages(c("dplyr", "stringr")) .


2 Answers

See if this works:

First, download the zip file from http://www.bioconductor.org/packages/release/bioc/html/graph.html

Second, install the package locally:

install.packages("yourpath/graph_1.56.0.zip",repos=NULL)

Then, library(graph) will load the package. You'll get a warning message the package was created unter a different version of R, but it will likely work this way.

like image 159
tifu Avatar answered Oct 03 '22 06:10

tifu


See the instructions at http://www.bioconductor.org/packages/release/bioc/html/graph.html:

Installation

To install this package, start R (version "3.5") and enter:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("graph", version = "3.8")
like image 37
Matt Avatar answered Oct 03 '22 06:10

Matt