group_modify.trackr_df | R Documentation |
Group modifying a data set acts in the normal way. The internal mechanics of
the modify function are opaque to the history. This means these can be used
to wrap any unsupported operation without losing the history (e.g. df %>% track() %>% group_modify(function(d,...) { d %>% unsupported_operation() })
) Prior to the operation the size of the group is calculated {.count.in}
and after the operation the output size {.count.out} The group {.strata}
is also available (if grouped) for reporting See dplyr::group_modify()
.
## S3 method for class 'trackr_df'
group_modify(
.data,
...,
.messages = NULL,
.headline = .defaultHeadline(),
.type = "modify",
.tag = NULL
)
.data |
A grouped tibble |
... |
Additional arguments passed on to
|
.messages |
a set of glue specs. The glue code can use any global variable, or {.strata},{.count.in},and {.count.out} |
.headline |
a headline glue spec. The glue code can use any global variable, or {.strata},{.count.in},and {.count.out} |
.type |
default "modify": used to define formatting |
.tag |
if you want the summary data from this step in the future then give it a name with .tag. |
the transformed .data dataframe with the history graph updated.
dplyr::group_modify()
library(dplyr)
library(dtrackr)
tmp = iris %>% track() %>% group_by(Species)
tmp %>% group_modify(
function(d,g,...) { return(tibble::tibble(x=runif(10))) },
.messages="{.count.in} in, {.count.out} out"
) %>% history()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.