March 2017
Beginner to intermediate
1065 pages
27h 7m
English
The first thing we will do next is to check that lattice works properly. For this example, we will use the iris dataset. The iris dataset is one of the best known in data science. It is composed of four numeric attributes Sepal.Length, Sepal.Width, Petal.Length and Petal.Width which are measures of iris plants, as well as a factor, or nominal attribute Species which describes the membership of the plants to 3 different iris species: Virginica, Setosa and Versicolor. The data set is composed of 150 observations.
Doing this first plot will also allow us to discover the formula syntax used in most plots with lattice:
xyplot(Sepal.Length ~ Sepal.Width | Species, data = iris)
In this line of code, we have ...
Read now
Unlock full access