Homepage > Medical Signal Detection

Exploration with R

R is a language and environment for statistical computing and graphics, and is available as free software. The system runs on Windows, Linux, and Mac, and can be downloaded from CRAN R project. Each ``command'' is executed in an interactive manner, known as ``interpretor,'' and is requested in a form of ``function,'' for example, it is a function demo(graphics) to show a demonstration of R graphics.
> demo("graphics")

Executing an external file. A script file (usually with extension ".r" or ".R") can be prepared as an external file, and executed in R with the command

> source("[script filename]")

Programming note. Your external file must be found in the working directory to be recognized from R. You can always change the working directory from R via [File]->[Change dir...]. Alternatively you can set the working directory by

> setwd("[pathname]")

Installing a package. R are extended through external packages. For example, iplots package provides highly interactive graphical capability for R programming, and integrates java into R. In order to install a package, simply use the following command in R:

> install.packages("[package name]")


© TTU Mathematics