cs-5821/hw1/.Rhistory
2017-02-08 02:20:48 -05:00

61 lines
1.4 KiB
R
Executable File
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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()