R tip: Access nested list items with purrr

R tip: Access nested list items with purrr

Assessment

Interactive Video

Architecture, Social Studies, Geography, Science

University

Hard

Created by

Quizizz Content

FREE Resource

This video tutorial explores handling nested lists in R using the purrr package. It demonstrates geocoding addresses with the R Geocode IO package, resulting in latitude and longitude data nested in list columns. The tutorial explains how to extract and manipulate data from these list columns using purrr's modify_depth function, showcasing elegant solutions for data extraction and modification. The video concludes with converting list data into vectors and integrating them into the original data frame.

Read more

3 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

Discuss the advantages of using the 'purrr' package for list manipulation in R.

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

Explain how to extract the first value from each data frame in a list column.

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

What is the purpose of the 'mutate' function in R, and how is it used in the context of adding vectors to a data frame?

Evaluate responses using AI:

OFF