InterviewSolution
| 1. |
What is lattice package in R used for? Explain with an example. |
|
Answer» Lattice is a powerful and high-level data visualization system inspired by trellis graphics for R. This is used with an emphasis to deal with multivariate data. This is CONTRIBUTED by a person named Deepayan Sarkar. We can take the mtcars dataset (car dataset with parameters such as mileage, WEIGHT, number of gears, number of cylinders etc.) for demonstrating some sample visualizations leveraging this package. Density plot and SCATTER plot matrix can be DRAWN by leveraging this library. # kernel density plot densityplot(~mpg, main="Density Plot", xlab="Miles per Gallon") # scatterplot matrix splom(mtcars[c(1,3,4,5,6)],main="MTCARS Data") |
|