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
From the course: R Essential Training: Wrangling and Visualizing Data
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Creating tidy data9m 46s
-
(Locked)
Using tibbles4m 51s
-
(Locked)
Using data.table4m 57s
-
(Locked)
Converting data from wide to tall and from tall to wide4m 13s
-
(Locked)
Converting data from tables to rows5m 2s
-
(Locked)
Working with dates and times6m 20s
-
(Locked)
Working with list data5m 13s
-
(Locked)
Working with XML data5m 22s
-
(Locked)
Working with categorical variables6m 29s
-
(Locked)
Filtering cases and subgroups7m 32s
-
(Locked)
-
-