Summarizing Data
Click here to open the slides (PDF).
R script from class:
myvar <- '42'
as.integer(myvar)
myvar <- 'hello'
as.integer(myvar)
myvar <- TRUE
class(myvar)
as.integer(myvar)
class(as.numeric(myvar))
class(as.character(myvar))
data(mtcars)
head(mtcars)
names(mtcars)[names(mtcars) == 'wt'] <- 'weight'
head(mtcars)
library(brickset)
data(legosets)
ggplot(legosets, aes(x = US_retailPrice)) + geom_histogram(bins = 20) + scale_x_log10()
ggplot(legosets, aes(x = US_retailPrice)) + geom_density() + scale_x_log10()
ggplot(data = legosets,
mapping = aes(x = US_retailPrice)) + geom_density() + scale_x_log10()