cat /etc/issue
Generally speaking, the installation of many R packages requires the R version. For example, BiocManager requires R (≥ 3.5.0), but does not require the latest version of the R language.
R to 3.5 is an unprecedented change because of the introduction of Bioconductor version: Release (3.8), so the lower version of R must be updated to 3.5 or more!
Ubuntu is a very stable update. Mine is actually Ubuntu 18. Other versions need to modify the Ubuntu source files. Use the VIM editor to modify the file: /etc/apt/sources.list
# First delete the old version of R that comes with the system
sudo apt-get--purge remove r-base r-base-core r-base-dev
sudo apt-get--purge remove r-base-core
sudo apt-get--purge remove r-base-dev
# sudo apt-get remove -y 'r-cran-*'
# apt-get remove will delete the software package and retain the software configuration file r
# apt-get purge will clear the software package and software configuration files at the same time
# Then update the Ubuntu source files
## Here, different Ubuntu systems are a bit different:
cat /etc/issue
# 18.04
# Use VIM to add the following code to/etc/apt/sources.list file
# deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo apt-get update
sudo apt-get install -y r-base r-base-core r-base-dev
This is just an example. The packages I use are very time-consuming to install. Generally speaking, it takes a long time.
options()$repos
options()$BioC_mirror
options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")options("repos"=c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))options()$repos
options()$BioC_mirror
# https://bioconductor.org/packages/release/bioc/html/GEOquery.html
if(!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("KEGG.db",ask = F,update = F)
BiocManager::install(c("GSEABase","GSVA","clusterProfiler"),ask = F,update = F)
BiocManager::install(c("GEOquery","limma","impute"),ask = F,update = F)
BiocManager::install(c("genefu","org.Hs.eg.db","hgu133plus2.db"),ask = F,update = F)
BiocManager::install(c('shiny','shinydashboard','stringr','DT','ggplot2'),ask = F,update = F)
https://www.rstudio.com/products/shiny/shiny-server/
https://www.rstudio.com/products/rstudio/download-server/
sudo su - \
- c "R -e \"install.packages('shiny', repos='https://mirrors.tuna.tsinghua.edu.cn/CRAN/')\""
sudo apt-get install gdebi-core
wget https://download3.rstudio.org/ubuntu-14.04/x86_64/shiny-server-1.5.9.923-amd64.deb
sudo gdebi shiny-server-1.5.9.923-amd64.deb
wget https://download2.rstudio.org/server/trusty/amd64/rstudio-server-1.2.1335-amd64.deb
sudo gdebi rstudio-server-1.2.1335-amd64.deb
In this case, http://139.9.249.168:3838/ and http://139.9.249.168:8787 are accessible.
From a code point of view, it is simple:
options()$repos
options()$BioC_mirror
options(BioC_mirror="https://mirrors.ustc.edu.cn/bioc/")options("repos"=c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))options()$repos
options()$BioC_mirror
BiocManager::install("scater")
BiocManager::install("Seurat")
BiocManager::install("monocle")
As for the usage of this R package, it is recommended to read the official website document:
Search and install the necessary system library files by yourself
sudo apt install openjdk-8-jre-headlesssudo apt-get install exfat-utils exfat-fuse
sudo apt-get-y install libcurl4-gnutls-dev libxml2-dev libssl-dev subversion scons libfuse-dev gcc
sudo apt-get-y install libmariadb-client-lgpl-dev libcurl4-openssl-dev libudunits2-dev
Recommended Posts