From the course: R for Data Science: Lunch Break Lessons

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

lattice: Introduction

lattice: Introduction

- [Instructor] R has three graphics environments. One of them base R, we've talked about quite a bit. And I've showed you several different examples of using base R plot type tools. The second is based around ggplot, it's part of the tidy verse, it's very popular. And the third one, which you may not be aware of is called lattice, sometimes trellis. Lattice is included with R, and in some cases, it's faster than ggplot. It has a better awareness of the output device. And it includes several different types of graphs already just built right in. Let's compare the base R plot command to lattice and we talked a little bit about lattice earlier in formulas, but let's dive down a little bit deeper and show you the examples here. Let's suppose that I want to see the average weight of a chick for each day, we're going to use the chick weight data set in line five I've created CW mean, which is an aggregate of chick weight and time…

Contents