




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 8
This page cannot be seen from the preview
Don't miss anything!





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)