September 2018
Beginner
206 pages
4h 27m
English
The following code can be used to load the datasets library:
library(datasets)install.packages("ggplot2")library(ggplot2)
The following code can be used to load the data:
data("iris")data("mpg")
The following code can be used to create a scatterplot to plot petal width without an axis label:
plot(iris$Petal.Width)
The following code can be used to create a scatterplot to plot petal width without axis labels:
plot(iris$Petal.Width, iris$Petal.Length, main = "Petal Length vs. Petal Width", xlab = "Petal Width", ylab = "Petal Length")
The following code can be used to create scatterplots in 1x2 grids to plot petal length and width with axis labels:
par(mfrow = c(1,2))plot(iris$Petal.Width, iris$Petal.Length, ...
Read now
Unlock full access