[R] Can I use group_map to iteratively process a dataframe?

Greg Minshall m|n@h@|| @end|ng |rom um|ch@edu
Sat Jun 5 08:37:14 CEST 2021


Madison,

by the way, it's sort of hard to follow your example.  there's some
concept of MWE ==? Minimum Working Example.  duckduckgo, or others on
the list, can probably point the way.

and, by the way :), i'm no expert.  in particular, not on magrittr
pipes, or on group_*, though i use both in some of my code.

> data <- read_csv("data_raw/EpiTest.csv") %>%
>   group_by(TestAssay)%>%
>   group_map(~ epi_analysis)

sans-pipe, i would have had

: group_map(df, epi_analysis, the_dir)

or some such.  in magrittr pipes, maybe that would be

: ... %>% group_map, epi_analysis, the_dir)

or some such?

hth.

cheers, Greg



More information about the R-help mailing list