This section is a guide to get you started with R, a language and environment for statistical computing and graphics. R is an open-source software and evolved from the S language, which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by John Chambers and colleagues. R itself was created by Ross Ihaka and Robert Gentleman at the University of Auckland, New Zealand, and is currently developed by the R Development Core Team.

R provides a wide variety of statistical and graphical techniques. Much of the system is itself written in the R language. For computationally-intensive tasks, C, C++ and Fortran code can be linked and called at run time.

R is highly extensible and can be extended via contributed packages originating in all fields of computational statistics. These packages are available through the CRAN (The Comprehensive R Archive Network). At the time of writing the CRAN package repository provides access to more than 18,000 packages.


Installing R and RStudio

If you are a Windows or Mac user, the easiest way to get started with R is to download a precompiled binary distribution of the base system and contributed packages. In case you get stuck it is recommendable to visit the FAQ sections for Windows and Mac.

Once you installed R you are ready to go, however we highly recommend to install RStudio as well. RStudio is an open-source integrated development environment (IDE) for R, which includes a console, syntax-highlighting editor that supports direct code execution, as well as tools for plotting, history, debugging and workspace management.

Prepackaged distributions of RStudio Desktop are available for Windows, macOS, and Linux. Note that RStudio is available in open source and commercial editions and runs on the desktop (Windows, macOS, and Linux) or in a browser connected to RStudio Server or RStudio Server Pro. We recommend to start with the open-source Desktop edition, which is found here.


Getting help

There is only one advice we provide:

\[**\text{GET YOUR HANDS DIRTY!}**\]

If you however, do not know where to start, we recommend to start here or if you want to start learning by coding take a look at the swirl package.


Citation

The E-Learning project SOGA-R was developed at the Department of Earth Sciences by Kai Hartmann, Joachim Krois and Annette Rudolph. You can reach us via mail by soga[at]zedat.fu-berlin.de.

Creative Commons License
You may use this project freely under the Creative Commons Attribution-ShareAlike 4.0 International License.

Please cite as follow: Hartmann, K., Krois, J., Rudolph, A. (2023): Statistics and Geodata Analysis using R (SOGA-R). Department of Earth Sciences, Freie Universitaet Berlin.