diff --git a/README.md b/README.md index 7621b70..80baa27 100644 --- a/README.md +++ b/README.md @@ -106,10 +106,31 @@ Model](vignettes/Appendix_The_RCX_and_CX_Data_Model.Rmd) Installation ============ +For installing packages from github the `devtools` package is the most common approach. +However, it requires XML libraries installed on the system which can cause problems while installation due to unmet dependencies. +The `remotes` package covers the functionality to download and install R packages stored in 'GitHub', 'GitLab', 'Bitbucket', 'Bioconductor', or plain 'subversion' or 'git' repositories without depending on XML libraries. +If `devtools` is already installed, of course it can be used, otherwise it is recommended to use the lightweight `remotes` package. + +**From github using remotes:** + +``` r +if(!"remotes" %in% installed.packages()){ + install.packages("remotes") +} +if(!"RCX" %in% installed.packages()){ + remotes::install_github("frankkramer-lab/RCX") +} +library(RCX) +``` + +**From github using devtools:** + ``` r -if (!"RCX" %in% installed.packages()) { - require(devtools) - install_github("frankkramer-lab/RCX") +if(!"devtools" %in% installed.packages()){ + install.packages("devtools") +} +if(!"RCX" %in% installed.packages()){ + devtools::install_github("frankkramer-lab/RCX") } library(RCX) ``` diff --git a/vignettes/RCX_an_R_package_implementing_the_Cytoscape_Exchange_format.Rmd b/vignettes/RCX_an_R_package_implementing_the_Cytoscape_Exchange_format.Rmd index a06b977..8da1f06 100644 --- a/vignettes/RCX_an_R_package_implementing_the_Cytoscape_Exchange_format.Rmd +++ b/vignettes/RCX_an_R_package_implementing_the_Cytoscape_Exchange_format.Rmd @@ -76,18 +76,41 @@ For an overview of the differences of the RCX implementation to the CX specifica # Installation +For installing packages from github the `devtools` package is the most common approach. +However, it requires XML libraries installed on the system which can cause problems while installation due to unmet dependencies. +The `remotes` package covers the functionality to download and install R packages stored in 'GitHub', 'GitLab', 'Bitbucket', 'Bioconductor', or plain 'subversion' or 'git' repositories without depending on XML libraries. +If `devtools` is already installed, of course it can be used, otherwise it is recommended to use the lightweight `remotes` package. + +**From github using remotes:** + ```{r, eval=FALSE} +if(!"remotes" %in% installed.packages()){ + install.packages("remotes") +} if(!"RCX" %in% installed.packages()){ - require(devtools) - install_github("frankkramer-lab/RCX") + remotes::install_github("frankkramer-lab/RCX") } library(RCX) ``` +**From github using devtools:** -```{r installBioconductor, eval=FALSE, include=FALSE} +```{r, eval=FALSE} +if(!"devtools" %in% installed.packages()){ + install.packages("devtools") +} if(!"RCX" %in% installed.packages()){ + devtools::install_github("frankkramer-lab/RCX") +} +library(RCX) +``` + + +```{r installBioconductor, eval=FALSE, include=FALSE} +if(!"BiocManager" %in% installed.packages()){ install.packages("BiocManager") +} +if(!"RCX" %in% installed.packages()){ BiocManager::install("RCX") } library(RCX)