DATA MINING-Shmueli
1:bar chart
barplot(y, names.arg = x,xlab = "x", ylab = "y")
# or
library(ggplot2)
ggplot(data.frame) + geom_bar(aes(x = x, y = y), stat = "identity")
y variable is a column in the dataset stat=“identity”
the variable is not a column in the dataset stat=“bin”
2: scatter plot
plot(y ~ x, xlab = "x", ylab = "y")
# or
library(ggplot2)
ggplot(housing.df) + geom_point(aes(x = x, y = y), colour = "color", alpha = )
3:histogram
hist(data, xlab = "data")
library(ggplot2)
ggplot(data.frame) + geom_histogram(aes(x = data), binwidth = n)
4:boxplot
boxplot(x ~ y, xlab = "x", ylab = "y"