powered by
Wrapper for group_map from package dplyr. Can be used to iterate on grouped tibbles.
dplyr
tibbles
gapply(x, f)
a grouped tibble.
tibble
a function to apply to each group. It should have at least 2 formal arguments: (1) the group data and (2) the group key.
List of results from calling f on each group.
f
group_map
# NOT RUN { # plot by country x <- world('country') f <- function(x, group) { plot(x$confirmed~x$date, main = group) } gapply(x, f) # }
Run the code above in your browser using DataLab