在UBUNTU虚拟机上安装R软件包

时间:2022-07-22
本文章向大家介绍在UBUNTU虚拟机上安装R软件包,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

原文链接:http://tecdat.cn/?p=14174

使用Ubuntu 虚拟机。安装某些软件包时可能会出现一些问题。一个窍门是打开终端

然后使用sudo命令安装一些软件包,

(输入密码后)。只需输入(或复制/粘贴)

sudo apt-get install libcurl4-openssl-devsudo apt-get install libxml2-devsudo apt-get install openjdk-8-*update-alternatives --config javasudo apt-get install aptitudesudo aptitude install libgdal-devsudo aptitude install libproj-devsudo apt-get install build-essential libcurl4-gnutls-dev libxml2-dev libssl-devsudo apt-get install curlsudo apt-get build-dep r-cran-rglsudo apt-get install r-cran-plyr r-cran-xml r-cran-reshape r-cran-reshape2 r-cran-rmysqlsudo apt-get install r-cran-rjavasudo apt-get install r-cran-glmnetsudo apt-get build-dep r-cran-bootsudo apt-get build-dep r-cran-classsudo apt-get build-dep r-cran-clustersudo apt-get build-dep r-cran-codetoolssudo apt-get build-dep r-cran-foreignsudo apt-get build-dep r-cran-kernsmoothsudo apt-get build-dep r-cran-latticesudo apt-get build-dep r-cran-masssudo apt-get build-dep r-cran-matrixsudo apt-get build-dep r-cran-mgcvsudo apt-get build-dep r-cran-nlmesudo apt-get build-dep r-cran-nnetsudo apt-get build-dep r-cran-rpartsudo apt-get build-dep r-cran-spatialsudo apt-get build-dep r-cran-survivalsudo apt-get build-dep r-cran-rodbcsudo apt-get build-dep

然后,在RStudio中,输入

install.packages("RCurl")install.packages("xml")install.packages("rJava")install.packages("rgdal")install.packages("xlsx")install.packages("devtools")