nytimes/2009/01/07/technology/business-computing/07program.html?pagewanted=all

18
http://www.nytimes.com/2009/01/07/technology/business-computing/07progr am.html?pagewanted=all

Upload: renee-barlow

Post on 02-Jan-2016

38 views

Category:

Documents


0 download

DESCRIPTION

http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html?pagewanted=all. Workspace Fewer Lines of Code Efficiency Capability. Package Code Documentation Datasets. Source Code Tons of Lines of Code Simplified. Data Structures. character vector. numeric vector. - PowerPoint PPT Presentation

TRANSCRIPT

http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html?pagewanted=all

Source Code- Tons of Lines of

Code Simplified

Package- Code- Documentation- Datasets

Workspace- Fewer Lines of Code- Efficiency- Capability

Character Vector: b <- c("one","two","three")

numeric vector

character vector

Numeric Vector: a <- c(1,2,5.3,6,-2,4)

Matrix: y<-matrix(1:20, nrow=5,ncol=4)

Dataframe:d <- c(1,2,3,4)e <- c("red", "white", "red", NA)f <- c(TRUE,TRUE,TRUE,FALSE)mydata <- data.frame(d,e,f)names(mydata) <- c("ID","Color","Passed")

List:w <- list(name="Fred", age=5.3)

Data Structures

Framework Source: Hadley Wickham

 Integrated Development Environment (IDE) 

Write Code/ Program- Input Data- Analyze- Graphics

Datasets, etc.

Enter CommandsView Results

Workflow

Statistics &Analysis

Data AnalysisGoals

Data Input

Visualization & Reporting

Data Management

Enter Manually

Combine Variables Add Variable Select a Subset

Input a Comma Separated Values

R Installation AlreadyIncludes Several Libraries

(3a) Graphical Parameters

(2) Statistical Function

(3b) Plot Function

Sample Script(1) Data Input

Currently, how many R Packages?

At the command line enter: dim(available.packages()) available.packages()

Specialized“Domain”

Course Some Coverage

statsgraphics(both built-in)

Data Managementplyrreshape

Graphicsggplot2

BayesianDifferentialEquationsEconometricsEnvironmetricsExperimentalDesignFinanceGeneticsHighPerformanceComputingMachineLearningMedicalImagingNaturalLanguageProcessingPharmacokineticsPhylogeneticsPsychometricsSocialSciencesSpatialTimeSeries

R Packages have been created that are equivalent to the functionality of SAS and SPSS

XLConnect

XML

rhbase

sas7bdat

Rcpp

Packages for reading, writing for various data sources and file formats

RJSONIO

Hmisc

RODBC / ROracle

foreign

RMySQL

RWeka

Comma Separated Variables

The R Graphics Package

Graphing Parameters

TitlesX-Axis TitleY-Axis TitleLegendScalesColorGridlines

library(help="graphics")

Basic Chart Types

Correlations Matrix library(car) scatterplotMatrix(h)

The next data visual was produced with about 150 lines of R code