cs-5821/hw1/.Rhistory

61 lines
1.4 KiB
R
Raw Permalink Normal View History

2017-01-25 04:05:14 +00:00
Auto = read.table("Auto.data")
dim(Auto)
range(Auto)
Auto = na.omit(Auto)
fix(Auto)
range(Auto)
dim(Auto)
Auto = read.csv("Auto.csv",header=T,na.strings="?")
Auto = read.table("Auto.data",header=T,na.strings="?")
dim(Auto)
range(Auto)
Auto=na.omit(Auto)
range(Auto)
Auto[1:4,]
Auto
range(Auto)
names(Auto)
fix(Auto)
plot(cylinders,mpg)
plot(cylinders,mpg)
attach(Auto)
plot(cylinders,mpg)
names()
names(Auto)
range(mpg)
range(names(Auto))
sapply()
sapply(1:3)
sapply(1:3,range(x)))
sapply(1:3,range(x))
sapply(names(),range(x))
help(sapply)
sapply(names(Auto),range(x))
sapply(names(Auto),range(X))
help(sapply)
sapply(names(Auto),range)
help(sapply)
sapply(Auto,range)
cylinders=as.factor(cylinders)
lapply(Auto,class)
auto = Auto
lapply(auto,class)
summary(Auto)
plot(Auto)
pairs(Auto)
sapply(Auto,range)
origin <- as.factor(origin)
cols.qlt = names(auto)
cols.qlt
cols.qlt = names(auto) %in% c("name,"origin")
cols.qlt2 = names(auto) %in% c("name,"origin")
cols.qlt = names(auto) %in% c("name","origin")
cols.qlt
lapply(auto[, !cols.qlt], range)
lapply(auto[, !cols.qlt], function(x){ c('mean'=mean(x), 'sd'=sd(x)))})
lapply(auto[, !cols.qlt], function(x){ c('mean'=mean(x), 'sd'=sd(x))})
lapply(auto[, !cols.qlt], function(x){ c('mu'=mean(x), 'sigma'=sd(x))})
lapply(auto[-(10:85), !cols.qlt], function(x){ c('mean'=mean(x), 'sd'=sd(x))})
lapply(auto[-(10:85), !cols.qlt], function(x){ c('mu'=mean(x), 'sigma'=sd(x))})
q()