Rstudio For Mac 3.3.2



  • 1.2 Installing RStudio. Whilst its eminently possible to just use the base installation of R (many people do), we will be using a popular Integrated Development Environment (IDE) called RStudio.RStudio can be thought of as an add-on to R which provides a more user-friendly interface, incorporating the R Console, a script editor and other useful functionality (like R.
  • If you have a MAC OS X; Click on Download R 3.3.2 for MACs (62 megabytes, 32/64 bit) (as of 11/8/2016; other version numbers may appear later than this date). A Windows installer in an over 70 MB R-3.3.2-win.exe file will download through your browser. When given a choice to unstuff or save, choose save and save it on your desktop.
  • 3.3.2 Knit your RMarkdown file. Let’s go ahead and “Knit” by clicking the blue yarn at the top of the RMarkdown file. It’s going to ask us to save first, I’ll name mine “testing.Rmd.” Note that this is by default going to save this file in your home directory /. Since this is a testing document this is fine to save here; we will.
  1. R Studio For Mac 3 3 2013
  2. R Studio For Mac 3 3 2007
  3. R Studio For Mac 3 3 2010
  4. R Studio For Mac 3 3 2016

Advanced installation is required to (a) install custom packages that (b) have their own C, C++, or Fortran code. In all other cases, the easy installation is sufficient.

2.1 Windows (NOT required for this course)

Note that by holding down the Control key during the launch of RStudio you can cause the R version selection dialog to display at startup. Mac OS X R from CRAN. On Mac OS X if the only version of R you have installed is the standard R distribution from CRAN then RStudio will by default run against the current version of R.Framework.

Advanced installation requires Rtools34.exe, available the Rtools web site. Download and click on the installer. Answer all installer questions with default values. The two most tricky parts are:

  1. Be sure to install the Rtools softare in a directory path that does not include spaces.
  2. Be sure that the system enironment variable PATH contains the path to the Rtools bin directory.

2.2 Mac (NOT required for this course)

2.2.1 Install Xcode and Xcode command line tools

Make sure you have Xcode and Xcode command line tools installed on your mac. If not, you can run the following command on your terminal application to install Code

For command line tools, go to http://developer.apple.com/downloads and sign in with your Apple ID (the same one you use for iTunes and app purchases). Look for ‘Command line tools’ through the search box, download the required file and install via the .dmg file on your machine.

For more detailed instructions on this, please visit this link.

2.2.2 Install of R and RStudio using homebrew (easy!)

Open your terminal application on your mac. Follow the steps below:

  • Install homebrew on your machine, copy and paste this in your terminal.
  • Update the “taps” on your machine and check if everything is fine.
  • Get brew cask and the homebrew science taps
  • Install Xquartz and Java
  • Finally install R and Rstudio

Note: the inclusion of the --appdir option. By default, Cask formula’s will create aliases in ~/Applications, but this option tells Homebrew to use /Applications instead

  • For more functionality with making documents with code embedded within it (literate programming),you have to install LaTeX on your machine as well.

2.2.3 Advanced R installation i.e compile from source

This step is not recommended for new users and it would be much easier installing R using homebrew.

We assume that the users have the following software installed,

  1. XCode and Xcode command line tools.
  2. gfortran, pcre, and liblzma
  3. XQuartz (https://www.xquartz.org/)
  4. Java JRE (jre-8u111-macosx-x64)
  • If gfortran, pcre or liblzma is not installed on your machine, you can follow the steps below. These steps help you install binaries of these programs without having to compile them from scratch.

One thing to keep in mind is the version of OSX being run, i.e take note of the binaries you download from http://r.research.att.com/libs/. Most people should be having OS-X Snow leopard or higher.

darwin_idMac OS version
darwin8for Mac OS X 10.4 (Tiger) or higher
darwin8932-bit for Mac OS X 10.4 or higher, 64-bit for Mac OS X 10.5 or higher
darwin9for Mac OS X 10.5 (Leopard) or higher
darwin10for Mac OS X 10.6 (Snow Leopard) or higher
darwin13for Mac OS X 10.9 (Mavericks) or higher
  • The next step is to download R from its source, by checkout from its svn repository.
  • Download recommended packages for R, this is available after you change into your devel or release-3-3 directory.
  • Be sure to configure R in a different directory as to where it was downloaded. All the libraries being installed will go into that directory.
  • Once the configuration goes through without any errors, run make
  • Install R-studio from this link.

Once R-studio is installed, and you have manually compiled R, you have to create an alias for your R-studio in your .bashrc or whatever shell you are using on your machine.

The alias will look like,

  • If you have multiple versions of R installed on your machine via source compilation, one way to refer to multiple version of R and Rstudio via aliases is given below.

In your .bashrc you can have something like:

Now you can call your R-release version using the command R-release and if you use the command RStudio-release , Rstudio will use the release version of R. Same goes with the commands R-dev and RStudio-dev.

All done!!

Try out the installation in a new terminal or after sourcing your .bashrc by

You should be all set and ready to use R!

2.3 Linux (NOT required for this course)

NOTE: see distribution-specific instructions and the R Installation and Administration manual for definitive directions.

For advanced Linux installation, a typical approach is ‘checkout’ the R source code from its SVN version control repository and retrieve recommended packages.

The next step is to configure the software, typically in an indepenent ‘bin’ directory

There are a number of configure options, see ~/src/R-3-3-branch/configure. Typical problems during configuration involve missing system libraries; the -dev versions of these libraries need to be installed by a system administrator.

The final step is to build the software

The executable is at ~/bin/R-3-3-branch/bin/R; it is convenient to add ~/bin/R-3-3-branch/bin to the system PATH variable or to create a shell alias pointing to the executable. A system-wide installation can be made available with

R Studio For Mac 3 3 2013

Rstudio

RStudio on RaspberryPi 3

R Studio For Mac 3 3 2007

I have been able to build RStudio server on my RaspberryPi 3.
One change was crucial: I added a 16GB swap file on an external disk to my system (mounting the external drive and using dphys-swapfile – available in Raspbian)
I used the current version of Raspbian (Jessie), updated all packages,
and did
sudo apt-get install pandoc pandoc-citeproc
I also built R 3.3.2 from the sources (since the Raspbian repo only has R 3.1.1).

Installation of R went smoothly just with configure and make.

R Studio For Mac 3 3 2010

A few times durning build, the were notifications of missing (system) libraries, but the instructions what to install (using sudo apt-get install) were clear enough to finish the build).
Then I dowloaded the RStudio source from github and followed
the build instructions.

R Studio For Mac 3 3 2016

The process is not finished after
make install
but the INSTALL instructions are very clear about how to get the server up and running.

One minor change need to be made:
RStudion installs x86 binaries of pandoc and pandoc-citeproc in
/usr/local/lib/rstudio-server/bin/pandoc
These binaries have to be renamed (or deleted), than RStudio will use the binaries installed
from the Raspbian repo.