Introduction to R

R is an open source programming language designed for statistical computing. In contrast with SQL, which most often operates on rows of table data, R is more suited to processing table data by columns. For example, it is straightforward in R to select a range of columns from a table and apply a statistical function to each of the values. R also includes a graphical component which allows table data to be plotted using a wide variety of graphs and charts.

In LiveCompare, R is implemented using the Execute R action. This is similar to the Execute SQL action: it runs a set of R statements against one or more source tables to produce a result table. However the column values from each of the source tables are immediately available to the R script as vectors. The Execute R action also supports other input and output types.

LiveCompare includes a number of sample R scripts, stored in the R script repository. These may be called directly using the Execute R action.

LiveCompare workflows may include Image datasets, which are used to store the graphs and charts generated by the Execute R action. The graphs and charts may be displayed directly in a workflow, or included in Dashboard reports.

The Execute R action requires that R is installed on your LiveCompare server as described in the LiveCompare Installation and Configuration Guide. If you are running LiveCompare from a client machine, you may wish to install R locally in order to try out some of the examples presented in the Help.

The internet includes a large number of R resources, in particular the R project site at http://www.r-project.org. This site includes download links for R and its associated packages, as well as links to documentation and frequently asked questions. In particular, the following manual in HTML format provides an introduction to R.

http://cran.r-project.org/doc/manuals/r-release/R-intro.html

For information on a particular R topic, you may wish to try an R-specific search engine, for example, http://www.rseek.org.

R Data Types

R Graphics

Managing R Packages

Row and Column Totals Example