In Mac OSX, we do this as follows: Create multiple folders (i.e., directories), one for each project (for example, /Rwork/Project1 and /Rwork/Project2 ). In R, use the Misc menu to change your working directory, and use the Workspace menu to load or save a workspace file. RStudio is a set of integrated tools designed to help you be more productive with R. It includes a console, syntax-highlighting editor that supports direct code execution, and a variety of robust tools for plotting, viewing history, debugging and managing your workspace. Last released version for Mac OS X 10.4 (Tiger) was R 2.10.1, last release for Mac OS X 10.5 (Leopard) was R 2.15.3, last release for Mac OS X 10.11 (El Capitan) was R 3.6.3. R for Mac OS X Development Tools and Libraries. This directory contains tools and libraries that are part of the base distribution of R for Mac OS X. Note: CRAN does not have Mac OS X systems and cannot check these binaries for viruses.
This is the new home for experimental binaries and documentation related to R for macOS. To learn more about the R software or download released versions, please visit www.r-project.org.All software on this page is strictly experimental and subject to acceptance of the supplied R license agreement and the disclaimer at the end of the page.
Starting with R 4.0.0 alpha we are building R using standard Apple tools (Xcode 11.4) and GNU Fortran 8.2 from fxcoudert and the target is macOS 10.13 (High Sierra). All dependent static libraries are available in the libs-4 directory. Please make sure you remove any modifications to build flags from your home since no custom compilers are used anymore. For more information about alternative OpenMP options (as in older version) see the openmp page of this site.
Index
Nightly builds for macOS
R framework
Build | OS | Date | Status | Download |
---|---|---|---|---|
R-3.6-branch 3.6.3 Patched (2020/04/28, r79376) | el-capitan | Oct 26 23:30 | x86_64: OK (log) Package: OK | R-3.6-branch-el-capitan-sa-x86_64.tar.gz (67Mb) R-3.6-branch-el-capitan-signed.pkg (77Mb, installer incl. GUI) |
R-4.0-branch 4.0.3 Patched (2020/10/26, r79376) | high-sierra | Oct 26 21:41 | x86_64: OK (log) Package: OK | R-4.0-branch.tar.gz (73Mb) R-4.0-branch.pkg (85Mb, installer incl. GUI) |
R-devel 4.1.0 Under development (unstable) (2020/10/26, r79376) | high-sierra | Oct 26 21:52 | x86_64: OK (log) Package: OK | R-devel.tar.gz (73Mb) R-devel.pkg (85Mb, installer incl. GUI) |
The installer image (*.pkg) is packaged exactly the same way as the CRAN release of R (including the GUI) and it will update your R version (unless you use pkgutil - see instructions during installation and/or the 'Multiple versions'section of the R Installation and Administration manual). Visor for mac.
Alternatively, you can use the tar-ball (*.tar.gz) in the table above. The tar-ball must be unpacked in the root directory using:
$ tar fvxz R*.tar.gz -C /
NOTE: The tar-ball does not contain the GUI (see below for a separate download).
NOTE: The installer includes Tcl/Tk package which will install in /usr/local. It is optional (only needed for the tcltk R package) and can be unchecked at installation time.
If you see any issues with the builds, please contact Simon Urbanek (the macOS maintainer of R) or report on the R-SIG-Mac mailing list.
Mac OS X GUI
Version | Build | Download |
---|---|---|
Mac OS X GUI rev. 7782 for R 3.6.x | el-capitan-Debug.dmg | R-GUI-7782-3.6-el-capitan-Debug.dmg |
Mac OS X GUI rev. 7782 for R 3.6.x | el-capitan-Release.dmg | R-GUI-7782-3.6-el-capitan-Release.dmg |
Mac OS X GUI rev. 7894 for R 4.0.x | high-sierra-Debug.dmg | R-GUI-7894-4.0-high-sierra-Debug.dmg |
Mac OS X GUI rev. 7894 for R 4.0.x | high-sierra-Release.dmg | R-GUI-7894-4.0-high-sierra-Release.dmg |
Mac OS X GUI rev. 7894 for R 4.1.x | high-sierra-Debug.dmg | R-GUI-7894-4.1-high-sierra-Debug.dmg |
Mac OS X GUI rev. 7894 for R 4.1.x | high-sierra-Release.dmg | R-GUI-7894-4.1-high-sierra-Release.dmg |
To install, open the image and drag the R icon to your Applications folder. Alternatively the GUI can be run directly off that image without copying if you just want to test it. Build configurations with '64' suffix are 64-bit builds, all others are 32-bit (except for Debug). If you want to use both, rename one of them or place them in different directories.
Tools
In order to compile R and R packages you will need Xcode Developer Tools and a Fortran compiler. For details and download, please read the Tools page. The R 4.0.0 and higer binaries are built using Xcode 11.4.Experimental binary packages
This site no longer hosts experimental packages. It is now the master repository for released R package binaries. If you have issues with other mirrors, try using https://mac.r-project.org/ as your mirror as it is updated first.Legacy R
The current build supports only macOS X 10.13 (High Sierra) or higher. Older versions of macOS are not supported in binary form, but R can be compiled from sources for such legacy OS versions. Last released version for Mac OS X 10.4 (Tiger) was R 2.10.1, last release for Mac OS X 10.5 (Leopard) was R 2.15.3, last release for Mac OS X 10.11 (El Capitan) was R 3.6.3.Other binaries
The following binaries are not maintained or supported by R-core and are provided without any guarantee and for convenience only (Mac OS X 10.4.4 or higher required). They match the binaries used on the CRAN binary build machine and thus are recommended for use with CRAN R package binaries.- GTK+ 2.24.17 framework - 64-bit build of GTK+ 2.24.17, necessary for binary R packages that use GTK+ version 2 (such as RGtk2+). R 3.0.0 and higher, Snow Leopard build
Download: GTK_2.24.17-X11.pkg (ca. 41MB) - GTK+ 2.18.5 framework - universal build of GTK+ 2.18.5, necessary for binary R packages that use GTK+ version 2 (such as RGtk2+). R 2.10.0 - 2.15.3, Leopard build
Download: GTK_2.18.5-X11.pkg (ca. 58MB) - RSwitch - a small GUI that allows you to switch between R versions quickly (if you have multiple versions of R framework installed).
Download: RSwitch-1.2.dmg (ca 67kB, universal, updated 2011/03/24 to support R 2.13.0 and up)
Sources: RSwitch-1.2.tar.gz (Xcode project and sources)NOTE: Bob Rudis is maintaining a new version of a tool which has RSwitch functionality and more - see 3rd party RSwitch replacement (NOT related to R-Foundation or CRAN!).
More external libraries for R 4.0.0 and higher can be found in the /libs-4/ directory. For older versions see the /libs/ directory.
Disclaimer
All software is provided 'as is' and any express or implied warranties, including, but but not limited to the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the publisher, copyright owner or contributors be liable for any direct, indirect, incidental,special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage.Mandatory tools
In order to compile R for macOS, you will need the following tools:- Xcode developer tools from Apple
Xcode can be obtained from Apple AppStore and the Xcode developer page. Older versions are available in the 'more' section of the Developer pages (Apple developer account necessary). - GNU Fortran compiler
Unfortunately Xcode doesn't contain a Fortran compiler, therefore you will have to install one. We recommend official GNU Fortran binaries from F.X.Coudert. CRAN High-Sierra builds currently use GNU Gortran 8.2 from that page (note that even though compiled for Mojave it is compatible with High Sierra).gfortran-8.2-Mojave.dmg (ca. 87MB, GNU Fortran 8.2 from F.X.Coudert)
SHA256 hash: 81d379231ba5671a5ef1b7832531f53be5a1c651701a61d87e1d877c4f06d369
This is a copy of GNU Fortran 8.2 build from https://github.com/fxcoudert/gfortran-for-macOS/releasesMake sure you add /usr/local/gfortran/bin to your PATH in order to use this compiler. This can be done, e.g. by
export PATH=$PATH:/usr/local/gfortran/bin
Mandatory libraries
Old versions of R provided fall-back versions of dependend libraries. This is no longer the case, the following libraries are not present in most recent macOS (or are too old) and have to be installed before R can be compiled:R For Mac Os X Faq
- liblzma (aka xz-utils) https://tukaani.org/xz/
- PCRE2https://www.pcre.org/ built with --disable-jit (JIT is buggy on macOS)
- bzip2 may need to be installed if the system version is too old
Note that all binaries used by CRAN are built using the recipes system and thus can be trasparently re-built accordingly.
Optional tools and libraries
The following tools and libraries are optional. R can be compiled without them, but they provide additional capabilities to R.- LaTeX
In order to produce documentation, LaTeX is necessary. It can be obtained from several places, for example as a part of MacTeX. - GNU readline,
Although Mac OS X comes with readline-replacement library, it lack some functionality like backward search etc. Therefore many user prefer GNU readline. For macOS 10.13 download see libs-4 on this site (for older OS X verions see libs). - PNG, JPEG and TIFF libraries
If bitmap manipulation libraries are present, R will add graphics device support for those bitmap formats. There are also other package that take advantage of PNG and JPEG, so it is in general a good idea to install them.Again, they are available in /libs-4 (new) and /libs (old). - cairo
R support for cairo graphics can be enabled by installing cario and dependent libraries (also provided in /libs-4). - subversion
If you want to check out R from the SVN repository, you will need subversion. It was included in Xcode 9 and earlier, but is no longer. We are providing a signed binary:
subversion-1.14.0-darwin15.6.tar.gz(SHA1: 9dab09d6cf608bea6224bdc3ec3e95893e4e9800)
which works on OS X 10.11 (El Capitan) and higher, is relocatable, i.e., you can put it anywhere you want since it only depends on system libraries.
(Static build with: apr-1.7.0, apr-util-1.6.1, openssl-1.1.1g, serf-1.3.9, sqlite-3.33.0, subversion-1.14.0)
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)
Old version of this page for much older OS X versions.