R: What are the pros and cons of using Lattice versus ggplot2?
Sometimes awkward to specify an entire plot in a single function call. Annotation in plot is not intuitive. Use of panel functions and subscripts difficult to wield and requires intense preparation. Cannot “add” to the plot once it's created.
The lattice add-on package is an implementation of Trellis graphics for R. It is a powerful and elegant high-level data visualization system with an emphasis on multivariate data.
The base plotting paradigm is "ink on paper" whereas the lattice and ggplot paradigms are basically writing a program that uses the grid -package to accomplish the low-level output to the target graphics devices.
Love what Roger Peng said when comparing Base/Lattice/gglot2 packages in his ppt: https://github.com/rdpeng/CourseraLectures/blob/master/ggplot2_part1.pptx
Pros:
Convenient, mirrors how we think of building plots and analyzing data
Cons:
Plots are created with a single function call (xyplot, bwplot, etc.)
Pros:
Cons:
Pros:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With