Question: title: Iteration and List Columns output: html_document: toc: true toc_float: true --- We've noted that functions are helpful when you repeat code more than twice;

title: "Iteration and List Columns" output: html_document: toc: true toc_float: true --- We've noted that functions are helpful when you repeat code more than twice; we've also noted that a lot of statistical methods involve doing the same thing a large number of times. Putting those together motivates a careful approach to iteratation. Meanwhile, R's data structures, especially data frames, are surprisingly flexible. This is useful when the "observations" you want to store become more complex than single values; for example, each row many contain a few scalar observations as well a complete data set. In these cases, _list columns_ are an appropriate column type, and `map` functions provide a way to interact with those columns. This is the second module in the [Iteration](topic_iteration.html) topic. ```{r, include = FALSE,message=FALSE,warning=FALSE} library(tidyverse) knitr::opts_chunk$set( echo = TRUE, warning = FALSE, fig.width = 6, fig.asp = .6, out.width = "90%" ) theme_set(theme_minimal() + theme(legend.position = "bottom")) options( ggplot2.continuous.colour = "viridis", ggplot2.continuous.fill = "viridis" ) scale_colour_discrete = scale_colour_viridis_d scale_fill_discrete = scale_fill_viridis_d ``` ## Overview {.tabset .tabset-pills} ### Learning Objectives There are stops along the way, but our goal is to use map functions and iterate over listcolumns in data frames

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!