6

I've made an installation for R and R Studio for Ubuntu 18.04. The intention is to have a working R Studio installation with the typical packages used in typical data wrangling. The script is as follows:

     # Install R
sudo apt update
sudo apt install gdebi libxml2-dev libssl-dev libcurl4-openssl-dev libopenblas-dev r-base r-base-dev

# Install RStudio
cd ~/Downloads
wget https://download1.rstudio.org/rstudio-xenial-1.1.447-amd64.deb
sudo gdebi rstudio-xenial-1.1.447-amd64.deb
printf '\nexport QT_STYLE_OVERRIDE=gtk\n' | sudo tee -a ~/.profile

# Install common packages
R --vanilla << EOF
install.packages(c("tidyverse","data.table","dtplyr","devtools","roxygen2","bit64","readr"), repos = "https://cran.rstudio.com/")
q()
EOF

# Install TDD packages
install.packages("testthis")

# Export to HTML/Excel
R --vanilla << EOF
install.packages(c("htmlTable","openxlsx"), repos = "https://cran.rstudio.com/")
q()
EOF

# Blog tools
R --vanilla << EOF
install.packages(c("knitr","rmarkdown"), repos='http://cran.us.r-project.org')
q()
EOF
sudo apt install python-pip
sudo apt install python3-pip
sudo -H pip install markdown rpy2==2.7.1 pelican==3.7.1
sudo -H pip3 install markdown rpy2==2.9.3 pelican==3.7.1 

# PDF extraction tools
sudo apt install libpoppler-cpp-dev default-jre default-jdk r-cran-rjava
sudo R CMD javareconf
R --vanilla << EOF
library(devtools)
install.packages("pdftools", repos = "https://cran.rstudio.com/")
install_github("ropensci/tabulizer")
q()
EOF

# TTF/OTF fonts usage
sudo apt install libfreetype6-dev
R --vanilla << EOF
install.packages("showtext", repos = "https://cran.rstudio.com/")
q()
EOF

# Cairo for graphic devices
sudo apt install libgtk2.0-dev libxt-dev libcairo2-dev
R --vanilla << EOF
install.packages("Cairo", repos = "https://cran.rstudio.com/")
q()
EOF

The script is also available here. It is based on a similar script for 17.10, available here. The script and the resulting RStudio-installation has been tested on Ubuntu Bungie 18.04 4.15.0-20-generic. Everything seems to work perfectly (so far...).

I have added all the packages that I usually use for general data wrangling. However, I am new to TDD in R, and the only package I have used so far for R-TDD is testthat3. That package has got me covered, but are there other TDD-related packages that should be added to a script like this?

5
  • @david-foerster: Changed to one question.
    – ElToro1966
    Jun 5, 2018 at 15:25
  • @david-foerster: Had a careful look at What types of questions should I avoid asking? and How do I ask a good question?. I also did a more thorough investigation of all the packages that are paramount for general data wrangling, and got that one pretty much covered. One thing that is not clear to me, however, is whether I've got TDD properly covered. It is a more specific question, but still of the "waddaya think"-variety...
    – ElToro1966
    Jun 8, 2018 at 15:38
  • Thanks for the update and clarification! The changes to your question should trigger an election among reviewers to reopen it. Now I think that you may find better answers over on Data Science (regardless of the status of your question on Ask Ubuntu) because I'm sure it sees more experienced R users with a good understanding of the more ”popular and relevant” modules. Jun 8, 2018 at 17:21
  • @david-foerster: Right. Will check out the data science group. Thanks.
    – ElToro1966
    Jun 11, 2018 at 8:19

0

Browse other questions tagged .