I have tibbles nested in a list with an identifier column as well. I would like to run anonymous functions on each nested tibble. However, when I use a pipe to refer to my main df and then to the list that contains my data map does not work.
# Creating the df
df_nested <- iris %>% group_by(Species) %>% nest()
# Does not work
# df_nested %>%
# map(data, nrow)
# Works
map(df_nested$data, nrow)
I would like to understand why doesn't the code work with using a pipe.