Description Usage Arguments Examples
Given a metric calculated using a groupr
object, one could need to
perform additional analysis using the data produced. For example, a
groupr
object could be used to count the number of employees in an
organization and get their total tenure, as broken out by various groups
(state, full/part time, etc.). A natural, additional calculation could be an
total tenure divided by count. This function is generalized so that any
function with one argument (df
) can be passed.
1 2 |
groupr |
A grouping object created with the function |
new_functions |
A list of functions (each with one argument: |
is_cbind |
Boolean value for whether or not the functions applied should
be added to the |
1 2 3 4 5 6 7 8 9 10 | permits_groupr <- groupr(
permits,
groups = c("type_desc", "issued_date", "existing_const_type")
)
extract_df(permits_groupr, "existing_const_type")
applied_groupr <- gapply(permits_groupr,
list(rounded = function(df) round(df$count, -2)),
is_cbind = TRUE
)
extract_df(applied_groupr, "existing_const_type")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.