Description Usage Arguments Value
A convenience function for mapping a function – which accepts a vector as input and outputs an atomic value – to a single column of a dataframe. If the dataframe is grouped, the function will be applied within each group.
1 | map_groups(x, col, f, ...)
|
x |
A tibble |
col |
Column to pass as a vector to |
f |
Function to be mapped to |
... |
Additional arguments to |
A dataframe with the original grouped columns (if x
had
originally been grouped) and a data
column containing
the output of the mapped function f
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.