Installing R on Mac OS from the command line

I just updated R remotely. I wanted to avoid the hassle of logging in via VNC (“Screen Sharing”), so I did this:

wget https://cran.rstudio.com/bin/macosx/R-3.2.3.pkg
sudo installer -pkg R-3.2.3.pkg -target /
rm R-3.2.3.pkg

Now, to get RStudio from the command-line:

wget https://download1.rstudio.org/RStudio-0.99.489.dmg
sudo hdiutil attach RStudio-0.99.489.dmg
sudo cp -R /Volumes/RStudio-0.99.489/RStudio.app /Applications/
sudo hdiutil detach /Volumes/RStudio-0.99.489
rm RStudio-0.99.489.dmg
Advertisements
This entry was posted in Mac, R and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s