Revision 11 as of 2017-11-09 17:16:33

Clear message

About R

R is an integrated suite of software facilities for data manipulation, calculation and graphical display.

Using R

In our environment you have the possibility to either directly start R from the command line or by using rstudio

By Command Line

with RStudio

RStudio is an integrated development environment (IDE) for R.

RStudio.png

Packages

R can be extended by more than 11'000 Packages. The standard (or base) packages are considered part of the R source code. They contain the basic functions that allow R to work, and the datasets and standard statistical and graphical functions that are described in the R manual.

Using a Base Packages

Let us assume you want to do some simple statistics about the height and weight of a family of four. The familly consists of the parents Jane and Joe and their kids Jim and June.

Member

Height

Weight

Jane

164

69

Joe

188

102

Jim

132

38

June

154

52

Now let us see what R can do with that values.

Using an additional Package

Since we provide only the basic R package, sooner or later you want to extend it with additional packages. This can be done by creating a local package library and install the additional packages there.

Configure R to use your local package library

Let us assume that you would like to create a local package library in ~/R/libraries. The following commands create that library and configure R to always use it as a resource.

Installing the rJava package

An Example Usage with rJava

Let us assume you have created a simple Java Class which creates a number of variables to be used and manipulated by R. Below you find the steps to use that class from within R.

.jclassPath()

[1] "/home/USERNAME/R/libraries/rJava/java"
[2] "/home/USERNAME/javatest"