Useful command - R

Useful command for R

Posted by Seasons on June 9, 2022

Useful commends - R

R

proxy

1
2
3
Sys.setenv(http_proxy = "10.71.115.244:3128")
Sys.setenv(https_proxy = "http://10.71.115.244:3128")
Sys.getenv()

Install new packages without root

1
2
3
4
5
6
7
8
chooseCRANmirror()
if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::version()

.libPaths()
install.packages("stringi")qq
BiocManager::install("Seurat", lib="/home/lty/R/x86_64-pc-linux-gnu-library/3.5")