140 likes | 154 Views
Understand the fundamentals of R: a statistical computing system with powerful tools for data analysis, matrix calculations, and visualization. Learn to use R packages, create arrays, load datasets, and more for effective data handling. Includes examples and resources for further exploration.
E N D
The R Projectfor statistical computing Eric Fouh, Christopher Poirel CS 5604 Fall 2010
Usages of R • statistics system • data handling and storage facility • calculations on arrays, in particular matrices • integrated collection of tools for data analysis • graphical tool for data analysis • programming language (called ‘S’)
Structure of R • R functions and dataset are stored in packages • R is provided with 25 “standard” packages: • Hundreds of contributed packages (written by different authors ) are available
Getting started with R • To start R >R • To quit R >q() • To see installed packages >library() • To load a package >library(class) • To start help > help.start() • To create a vector > x <- c(10.4, 5.6, 3.1, 6.4, 21.7) • To create a matrix > x <- array(1:20, dim=c(4,5)) # Generate a 4 by 5 array filled with number from 1 to 20. • To display an object >x • To delete an object >rm x • To load data from file >HousePrice <- read.table("houses.data")
Examples (1) • Term-Document Matrix
Examples (2) • Eigenvalues and eigenvectors
Examples(3) • Law Rank approximation
Resources • IIR Book • http://www.r-project.org/ Questions?