August 27, 2008
嚜澠ntroduction to R
and
Exploratory Data Analysis
August 27, 2008
Introduction to RandExploratory Data Analysis 每 p.1/18
Agent Orange Case Study (SS Ch 3)
Dioxin concentrations in parts per trillion (ppt) for 646
Vietnam veterans and 97 veterans who did not serve in
Vietnam.
sample (nonrandom) of Vietnam vets who served
during 1967-1968
sample (nonrandom) of vets who served in the US
and Germany between 1965-1971
Dioxin measurements taken in 1987
Observational Study
Introduction to RandExploratory Data Analysis 每 p.2/18
Startup R
Unix command line: R
Windows/Mac double-click R GUI
Under emacs/ESS enter M-x R
Introduction to RandExploratory Data Analysis 每 p.3/18
Creating a Dataframe in R
> vets = read.table("case0302.csv", header=T,
sep=",")
> names(vets)
[1] "DIOXIN" "VETERAN"
Notes:
1. header=T tells R that the first line of the file contains
variable names
2. sep="," tells R that columns of data are separated
by a comma (the csv format)
3. the names function extracts the names of variables in
a dataframe
Introduction to RandExploratory Data Analysis 每 p.4/18
Reading Data
read.csv Comma separated variable format
read.fwf Fixed width format
read.delim Tab delimited files
See help(read.table) for options, such as setting
character for NAs, column separators, skipping lines, etc
See also scan() for reading in large files
Introduction to RandExploratory Data Analysis 每 p.5/18
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related searches
- today in history september 27 msn
- c reactive protein of 27.5
- 2008 v8 vantage for sale
- dow jones 2008 to 2016
- 2008 first time homebuyer repayment
- stock market graph from 2008 to 2018
- 2008 major events timeline
- sept 27 in history
- september 27 events in history
- 2008 ford 6.8 v10 problems
- what caused the 2008 financial crisis
- 2008 aston martin vantage reviews