Skip to content
Snippets Groups Projects
Commit 67f5c42c authored by Dominik Brilhaus's avatar Dominik Brilhaus
Browse files

polish installation notes

parent 278340f5
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env Rscript
########################
# Installation of R dependencies
########################
### sleuth installation
if (!requireNamespace("BiocManager", quietly = TRUE)){install.packages("BiocManager")}
if(!"BiocManager" %in% row.names(installed.packages())){BiocManager::install()}
if(!"devtools" %in% row.names(installed.packages())){BiocManager::install("devtools")}
# BiocManager::install("pachterlab/sleuth")
# There's currently (early 2022) an issue with sleuth installation.
# Using this workaround from https://github.com/pachterlab/sleuth/issues/259#issuecomment-1001076030
if(!"sleuth" %in% row.names(installed.packages())){remotes::install_github("pachterlab/sleuth#260")}
library(sleuth)
### other packages
library(tidyverse)
library(jsonlite)
library(openxlsx)
required_packages <-
c('tidyverse', ## data wrangling and plotting
'jsonlite', ## read/write json files
'openxlsx') ## read/write xlsx files
for(package in required_packages)
{
## Check if package is installed. If not, install
if(!package %in% row.names(installed.packages())){install.packages(package,
repos ="https://cran.uni-muenster.de/")}
# ## Check if package is up to date. If not, update
# update.packages(package, repos = "https://cran.uni-muenster.de/")
## Load package
library(package, character.only = T)
print(paste("installed R package", package))
}
#!/usr/bin/env Rscript
################################################
### Installation of R dependencies #############
################################################
### Default (CRAN)
if(!"tidyverse" %in% row.names(installed.packages())){install.packages("tidyverse")}
if(!"jsonlite" %in% row.names(installed.packages())){install.packages("jsonlite")}
if(!"openxlsx" %in% row.names(installed.packages())){install.packages("openxlsx")}
if(!"kableExtra" %in% row.names(installed.packages())){install.packages("kableExtra")}
if(!"shiny" %in% row.names(installed.packages())){install.packages("shiny")}
if(!"RColorBrewer" %in% row.names(installed.packages())){install.packages("RColorBrewer")}
### From BiocManager
if (!requireNamespace("BiocManager", quietly = TRUE)){install.packages("BiocManager")}
if(!"BiocManager" %in% row.names(installed.packages())){BiocManager::install()}
if(!"devtools" %in% row.names(installed.packages())){BiocManager::install("devtools")}
if(!"sleuth" %in% row.names(installed.packages())){BiocManager::install("pachterlab/sleuth")}
### Test load packages
library(tidyverse)
library(jsonlite)
library(openxlsx)
library(sleuth)
library(kableExtra)
library(shiny)
library(RColorBrewer)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment