Data Visualization using R: Scale Space and Univariate/Categorical Data Analysis, Study notes of Statistics

This document demonstrates the use of r programming language for data visualization, focusing on scale space analysis and univariate/categorical data. The document reads data from various files, applies data preprocessing techniques, and generates visualizations such as strip charts, box plots, and kernel density plots. The analysis is performed on chondrite data and singer data.

Typology: Study notes

Pre 2010

Uploaded on 07/31/2009

koofers-user-59i
koofers-user-59i 🇺🇸

10 documents

1 / 8

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
R03 – Scale Space and Univariate/Categorical Data Visualization
> chondrite<-scan("C:/Documents and Settings/minnotte/My Documents/Stat
6560/chondrite_dat.txt")
Read 22 items
>
> source("C:/Documents and Settings/minnotte/My Documents/Stat
6560/modetree_r.txt")
> chontree <- modetree(chondrite)
> modetreeplot(chontree)
> chonentree <- enhmtree(chondrite)
> source("C:/Documents and Settings/minnotte/My Documents/Stat
6560/forest_r.txt")
>
> chonrfor <- resamp.forest(chondrite)
> chonrfor <- resamp.forest(chondrite,nh=100)
pf3
pf4
pf5
pf8

Partial preview of the text

Download Data Visualization using R: Scale Space and Univariate/Categorical Data Analysis and more Study notes Statistics in PDF only on Docsity!

R03 – Scale Space and Univariate/Categorical Data Visualization

chondrite<-scan("C:/Documents and Settings/minnotte/My Documents/Stat 6560/chondrite_dat.txt") Read 22 items

source("C:/Documents and Settings/minnotte/My Documents/Stat 6560/modetree_r.txt") chontree <- modetree(chondrite) modetreeplot(chontree) chonentree <- enhmtree(chondrite) source("C:/Documents and Settings/minnotte/My Documents/Stat 6560/forest_r.txt")

chonrfor <- resamp.forest(chondrite) chonrfor <- resamp.forest(chondrite,nh=100)

chonnfor <- nnjit.forest(chondrite,nh=100) chonsfor <- subsamp.forest(chondrite,nh=100) data(iris) plength<-iris[,3] plengthfor<-subsamp.forest(plength,nh=100) source("C:/Documents and Settings/minnotte/My Documents/Stat 6560/sizer_r.txt") chonsize <- sizer(chondrite)

singer$voice<-ordered(singer$voice,levels=unique(singer$voice)) singer$voice4<-ordered(singer$voice4,levels=unique(singer$voice4)) singer$gender<-ordered(singer$gender,levels=unique(singer$gender))

height<-singer$height gender<-singer$gender voice4<-singer$voice voice<-singer$voice stripchart(height~gender,"s") stripchart(height~voice4,"s") stripchart(height~voice,"s") stripplot(voice4~height,singer,jitter=T) boxplot(height~gender) boxplot(height~voice4)

boxplot(height~voice)

bwplot(height~gender) bwplot(height~voice4) bwplot(height~voice) qqmath(~height|gender,dist=qunif) qqmath(~height|gender,dist=qnorm)

qq(gender~height,singer) tmd(qq(gender~height,singer)) qq(voice4~height,singer[gender=="Male",]) tmd(qq(voice4~height,singer[gender=="Male",])) hfit<-oneway(height~voice4) hfit$location [1] 64.12121 65.38710 69.40476 70. hres<-hfit$residuals stripplot(voice4~hres,jitter=T) bwplot(hres~voice4)

manykde(hres,voice4,1) manykde(hres,voice4,"SJ-dpi") qqmath(~hres|voice4,dist=qnorm) rfs(hfit) pfit<-oneway(Petal.Length~Species,iris) rfs(pfit)