Skip to content

Instantly share code, notes, and snippets.

@elmerehbi
Last active November 29, 2017 23:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elmerehbi/647d266a0f13141bd93ed3a619fe32ba to your computer and use it in GitHub Desktop.
Save elmerehbi/647d266a0f13141bd93ed3a619fe32ba to your computer and use it in GitHub Desktop.
#!/bin/bash
## R
## Note that you will still need to confirm some installations at the terminal
## Packages needed for R
sudo apt-get install --yes libmysqlclient-dev # RMySQL
sudo apt-get install --yes libxml2-dev # XML package, or
sudo apt-get install --yes r-cran-xml
sudo R CMD javareconf # to check java
sudo apt-get install --yes openjdk-9-jre # Java for rJava, or
# sudo apt-get install --yes openjdk-6-jre # Java for rJava, or
# sudo apt-get install --yes openjdk-6-* # you migth prefer openjdk-7-jdk # sudo apt-get install --yes openjdk-7-*
# sudo apt-get build-dep r-cran-rjava # rJava
sudo apt-get install --yes r-cran-rjava # rJava
sudo apt-get install --yes libssh2-1-dev # needed to install devtools
sudo apt-get install --yes libcurl4-openssl-dev # required for curl() & swirl(); see
# https://github.com/swirldev/swirl/wiki/Installing-swirl-on-Linux
sudo apt-get install --yes littler # contains Rscript to run r-cusomize.R
sudo apt-get install --yes libgtk2.0-dev # required to install "rattle" package
sudo apt-get install --yes zlib1g-dev libssl-dev # required to build git2r for devtools
sudo apt-get install --yes libzmq3-dev libx11-dev
# needed fot "rgl"
sudo apt-get install --yes r-cran-rgl
sudo apt-get install --yes libpng16-dev
# may be needed
sudo apt-get install --yes xorg libglu1-mesa-dev x11proto-gl-dev
dpkg -l make gcc gfortran g++ # to check for packages before intalling
sudo apt-get install --yes make gcc gfortran g++
# ## Microsoft R Open (MRO)
# if [ -f mro.tar.gz ]; then
# echo
# else
# echo
# echo "Downloading MRO. This may take a while depending on your internet connection."
# echo
# wget -O mro.tar.gz https://mran.blob.core.windows.net/install/mro/3.4.2/microsoft-r-open-3.4.2.tar.gz
# fi
# tar -xf mro.tar.gz
# cd microsoft-r-open
# sudo ./install.sh
# # follow instructions
# # R Profile
cp ./.Rprofile ~/ # needed to hard code CRAN repo to be used
Rscript r-customize.R # depends on R
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment