## You are here

# R Language Feature: Programming Language Features

*** Requires additional open-source community packages from CRAN

## Input / Output

- Files
- text files (r/w)
- .csv files (r/w)
- binary files (r/w)
- URLs (r)
- XML (r/w)

- Database Connectivity
- MySQL
- ODBC
- Oracle
- PostgresSQL
- SQLite
- Teradata

## Object-oriented programming

- Object oriented structures
- S3, S4 and S5 classes

- Functions
- user defined functions
- closures
- environments
- recursive functions

- Control structures
- conditional execution: if
- conditional execution with alternative: if else
- looping: for, while, repeat

- Data structures
- Arrays
- Vectors
- Matrices
- Lists
- Data Frames

- Data Types
- numeric
- character
- factors
- logical
- missing values

- String handling
- subsetting
- splitting
- concatenating
- merging
- character searching
- regular expressions

- Basic arithmetic
- addition, subtraction, multiplication and division
- powers
- matrix multiplication
- modulo arithmetic

- Logical and Relational operators
- Equal to / not equal to
- <, >, <=, >=
- is missing
- logical AND, OR and NOT

- Integration with other environments
- C
- JAVA
- Perl
- Python

- Parallel programming
- apply functions to columns of an array
- foreach iteration
- iterators
- High Performance Computing
- parallel backends
- Network Spaces
- SMP
- Snow

## Distributed Computing

- Amazon EC2 compatibility

## Included R Packages

- Base Packages
- base - Base R functions (and datasets before R 2.0.0).
- compiler - R byte code compiler (added in R 2.13.0).
- datasets - Base R datasets (added in R 2.0.0).
- grDevices - Graphics devices for base and grid graphics (added in R 2.0.0).
- graphics - R functions for base graphics.
- grid - A rewrite of the graphics layout capabilities, plus some support for interaction.
- methods - Formally defined methods and classes for R objects, plus other programming tools, as described in the Green Book.
- parallel -Support for parallel computation, including by forking and by sockets, and random-number generation (added in R 2.14.0).
- splines -Regression spline functions and classes.
- stats - R statistical functions.
- stats4 - Statistical functions using S4 classes.
- tcltk - Interface and language bindings to Tcl/Tk GUI elements.
- tools - Tools for package development and administration.
- utils- R utility functions.

- Recommended Packages
- KernSmooth - Functions for kernel smoothing (and density estimation) corresponding to the book "Kernel Smoothing" by M. P. Wand and M. C. Jones, 1995.
- MASS - Functions and datasets from the main package of Venables and Ripley, "Modern Applied Statistics with S". (Contained in the VR bundle for R versions prior to 2.10.0.)
- Matrix - A Matrix package. (Recommended for R 2.9.0 or later.)
- boot - Functions and datasets for bootstrapping from the book "Bootstrap Methods and Their Applications" by A. C. Davison and D. V. Hinkley, 1997, Cambridge University Press.
- class - Functions for classification (k-nearest neighbor and LVQ). (Contained in the VR bundle for R versions prior to 2.10.0.)
- cluster - Functions for cluster analysis.
- codetools - Code analysis tools. (Recommended for R 2.5.0 or later.)
- foreign - Functions for reading and writing data stored by statistical software like Minitab, S, SAS, SPSS, Stata, Systat, etc.
- lattice - Lattice graphics, an implementation of Trellis Graphics functions.
- mgcv - Routines for GAMs and other generalized ridge regression problems with multiple smoothing parameter selection by GCV or UBRE.
- nlme - Fit and compare Gaussian linear and nonlinear mixed-effects models.
- nnet - Software for single hidden layer perceptrons ("feed-forward neural networks"), and for multinomial log-linear models. (Contained in the VR bundle for R versions prior to 2.10.0.)
- rpart - Recursive PARTitioning and regression trees.
- spatial - Functions for kriging and point pattern analysis from "Modern Applied Statistics with S" by W. Venables and B. Ripley. (Contained in the VR bundle for R versions prior to 2.10.0.)
- survival - Functions for survival analysis, including penalized likelihood.

- Third Party Packages
- XML (Windows only) - functions for reading and creating XML documents
- RUnit - R functions implementing a standard unit test framework
- snow - functions for parallel computing on multi-core Windows computers and clusters
- randomForest - random forest algorithms
- multicore (Linux only) functions for running parallel algorithms on multi-core Linux machines