R:在Ubuntu14.04 安装R
生活随笔
收集整理的這篇文章主要介紹了
R:在Ubuntu14.04 安装R
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019獨角獸企業重金招聘Python工程師標準>>>
https://www.digitalocean.com/community/tutorials/how-to-set-up-r-on-ubuntu-14-04
設置APT
$ sudo sh -c 'echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list'$ gpg --keyserver keyserver.ubuntu.com --recv-key E084DAB9$ gpg -a --export E084DAB9 | sudo apt-key add -安裝
$ sudo apt-get update$ sudo apt-get -y install r-base測試
$ RR version 3.2.1 (2015-06-18) -- "World-Famous Astronaut" Copyright (C) 2015 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit)R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details.Natural language support but running in an English localeR is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications.Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R.>退出:
> q(save = "no")安裝package
方式1:
$ R > install.packages("somepackage")方式2:
$ sudo su - -c "R -e \"install.packages('shiny', repos = 'http://cran.rstudio.com/')\""注意repos參數。
測試:
$ R > library(shiny)安裝devtools包
有些包并不在CRAN中, 可以使用devtools安裝。
安裝:
$ sudo apt-get -y install libcurl4-gnutls-dev libxml2-dev libssl-dev$ sudo su - -c "R -e \"install.packages('devtools', repos='http://cran.rstudio.com/')\""使用devtools從Github中安裝package
例如安裝shinyjs包:
$ sudo su - -c "R -e \"devtools::install_github('daattali/shinyjs')\""測試:
$ R > library(shinyjs)轉載于:https://my.oschina.net/letiantian/blog/614200
總結
以上是生活随笔為你收集整理的R:在Ubuntu14.04 安装R的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Elasticsearch 2.20入门
- 下一篇: Renascence架构原理——遗传规划