Install R in Ubuntu

Step 1: Update Sources.List File
- Edit the sources.list file
sudo gedit /etc/apt/sources.list
- Add following entry
deb http://cran.rstudio.com/bin/linux/ubuntu utopic/
Step 2: Add the Public Keys
gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -
Step 3: Install R-base
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install r-base build-essential gfortran libxml2-dev libcurl4-openssl-dev libfreetype6-dev libbz2-dev liblapack-dev  libpcre++-dev  r-base-dev  liblzma-dev r-cran-rcpp r-cran-rjava openjdk-7-jre

wants <- c("knitr","rmarkdown","devtools","epicalc","mosaic","showtext","pander","PerformanceAnalytics","fitdistrplus","CircStats","MASS","mixtools","boot","TrialSize","vcd","ggplot2","pspearman","gvlma","car","lmtest","leaps","plyr","bootstrap","elrm","rms","Deducer","bestglm","survival","robust","mlogit", "nnet", "VGAM","ordinal","Sample.Size","samplesize4surveys","SampleSizeMeans","SampleSizeProportions","mosaic","XML","pipeR","formatR","shiny","expm","koRpus")
has   <- wants %in% rownames(installed.packages())
if(any(!has)) install.packages(wants[!has])

devtools::install_github("rstudio/rticles")
devtools::install_github("rstudio/rmarkdown")


评论

此博客中的热门博文

V2ray websocket(ws)+tls+nginx分流

Rstudio 使用代理