Description Usage Arguments Details Value Note
A function similar to dplyr::group_map()
, but returning
a grob list (grid::gList()
).
1 |
.data |
A data frame to map. Must include columns referred to in |
.f |
A function to apply to groupings of .data (grouped by |
by |
The name of the grouping variable. |
values |
The name of the value variable to pass to |
... |
Any additional parameters to pass to |
The map-style functions are great for applying a function across
a series of data, particularly the dplyr::group_map()
.
This function wraps dplyr::group_map()
, so that a grid::gList()
is returned
for use in grob-related functions. So the class of the list is set to gList,
as is done in the grid::gList()
function.
A mapped function is expected to take two fixed parameters, the grouped data frame
and a tibble representing the group_by variable names. The function must also take
a x
parameter that specifies the x variable (assuming the y is the group_by variable).
A grid::gList()
of grid::grob()
that result from calling f
from X$values
, grouped
by X$by
.
The by
must be a factor, since we extract the
numeric value currently to use in the called function. The assumption
would be that by
will represent a coordinate within the grob (though
it's not required to).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.