首页 > 代码库 > ubuntu之R攻略
ubuntu之R攻略
安装依赖库
sudo aptitude -y install tcl-dev tk-dev sudo aptitude -y install libicu-dev liblzma-dev sudo aptitude -y install libpng12-dev libjpeg-dev libtiff4-dev libcairo2-dev
安装R
wget http://mirrors.xmu.edu.cn/CRAN/src/base/R-3/R-3.1.1.tar.gz -nc -O ~/download/R-3.1.1.tar.gz tar zxvf ~/download/R-3.1.1.tar.gz -C /tmp/ cd /tmp/R-3.1.1/ ./configure --enable-R-shlib --with-tcl-config=/usr/lib/tclConfig.sh --with-tk-config=/usr/lib/tkConfig.sh make sudo make install
安装rstudio
wget http://download1.rstudio.org/rstudio-0.98.978-amd64.deb -nc -O ~/download/rstudio-0.98.978-amd64.deb sudo dpkg -i ~/download/rstudio-0.98.978-amd64.deb
安装package(在R中运行)
install.packages(c("ggplot2", "DMwR", "vegan", "ade4", "geoR", "caret", "pcaPP", "rJava", "indicspesies", "roxygen2", "snowfall", "rpf", "numDeriv", "psych", "geosphere"), repos = "http://172.30.0.75/cran") source("http://bioconductor.org/biocLite.R") biocLite() biocLite(c("BiocInstaller", "qvalue", "DirichletMultinomial", "impute", "minet", "GO.db", "org.Hs.eg.db", "org.Mm.eg.db")) install.packages("WGCNA", repos = "http://172.30.0.75/cran")
安装源代码版OpenMx
sudo aptitude install -y curl cd ~/download svn checkout "http://openmx.psyc.virginia.edu/svn" OpenMx cd OpenMx/truck sudo make install
.Rprofile设置
# options(papersize="a4") options(editor="vim") options(tab.width = 2) options(width = 130) # options(prompt="> ") options(continue="+ ") # .First <- function() { library(utils) if(interactive()) try(loadhistory("~/.Rhistory")) } # ...... .Last <- function() { if(interactive()) try(savehistory("~/.Rhistory")) }
ubuntu之R攻略
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。