<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/install-r-packages-on-the-ubuntu-virtual-machine/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://freakonometrics.hypotheses.org/50127"> R-english – Freakonometrics</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>For the <a target="_blank" rel="nofollow" href="https://freakonometrics.hypotheses.org/50065">(Advanced) R Crash Course</a> of the Data Science for Actuaries program, we will use the Ubuntu <a target="_blank" rel="nofollow" href="https://www.virtualbox.org/">virtual machine</a>. There might be some issues when installing some packages… One trick can be to open a <a target="_blank" rel="nofollow" href="https://doc.ubuntu-fr.org/terminal">terminal</a></p>
<p><img alt="" src="https://i2.wp.com/freakonometrics.hypotheses.org/files/2017/02/sudo1.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>and then to use the <a target="_blank" rel="nofollow" href="https://doc.ubuntu-fr.org/sudo">sudo</a> command, to install some packages,</p>
<p><img alt="" src="https://i0.wp.com/freakonometrics.hypotheses.org/files/2017/02/sudo2.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>(after entering the password). Just type (or copy/paste)</p>
<p><code>sudo apt-get install libcurl4-openssl-dev<br>
sudo apt-get install libxml2-dev<br>
sudo apt-get install openjdk-7-*<br>
update-alternatives --config java<br>
sudo apt-get install aptitude<br>
sudo aptitude install libgdal-dev<br>
sudo aptitude install libproj-dev<br>
sudo apt-get install curl<br>
sudo apt-get build-dep r-cran-rgl<br>
sudo apt-get install r-cran-plyr r-cran-xml r-cran-reshape r-cran-reshape2 r-cran-rmysql<br>
sudo apt-get install r-cran-rjava</code></p>
<p>Then, in <a target="_blank" rel="nofollow" href="https://www.rstudio.com/">RStudio</a>, enter</p>
<p><code>install.packages(&quot;RCurl&quot;)<br>
install.packages(&quot;xml&quot;)<br>
install.packages(&quot;rJava&quot;)<br>
install.packages(&quot;rgdal&quot;)<br>
install.packages(&quot;xlsx&quot;)</code></p>
<p>It should be fine…</p>
<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://freakonometrics.hypotheses.org/50127"> R-english – Freakonometrics</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/search/data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/search/map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/search/animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/search/sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/search/SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/search/eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/search/git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/search/hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/search/regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/search/PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/search/time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/search/trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/RZidEb8GWpw"></a></div>