From the course: R Essential Training: Wrangling and Visualizing Data

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Working with list data

Working with list data

From the course: R Essential Training: Wrangling and Visualizing Data

Start my 1-month free trial

Working with list data

- [Instructor] The most general format for data in R, the most flexible, is the list. Unfortunately, it also means that lists are really hard to work with. When you get the results of analysis, say, you do a regression, that regression's results are actually stored in a list. And lists allow you to have lots of different data types and different structures and different lengths. And in fact, you can have lists within lists. But I want to show you a few simple functions for dealing with lists and getting them into a format that's more usable for the questions that you may have. So I'm going to start by simply loading a couple of packages right here. And then I'm going to come down, and I'm going to create a tiny little list data set. What I'm going do is I'm going to create a list and I'm going to save it as dat, which is short for data. I use df, for data frame, but lists are definitely not data frame, so I'm ignoring that…

Contents