1.首先更新sources.list
cd /etc/apt/sudo gedit sources.list2.更新软件源
deb ht t p://mirrors.ustc.edu.c n/CRAN/bin/linux/ubuntu/ precise/sudo apt-get update
3.安装R语言
sudo apt-get install r-base4.安装r-base-dev包sudo apt-get install r-base-dev5.使用R软件命令行下输入R6.命令行下输入
#!/usr/bin/Rscriptprint("zjhello123.blog.163.com")
输出显示 [1] "zjhello123.blog.163.com"至此,我们便完成了在ubuntu环境下安装R语言。
温馨提示:答案为网友推荐,仅供参考