View source: R/mean-by-group.R
dh.meanByGroup | R Documentation |
This has similar functionality to tapply
or the dplyr chain group_by
%>%
summarise
. It offers additional flexilibity over ds.tapply
in that it
allows you to specify upper and lower values for each strata. By contrast,
ds.tapply will produce a summary based on every unique value of the grouping
variable, which may not always be what is required.
dh.meanByGroup(
df = NULL,
outcome = NULL,
group_var = NULL,
intervals = NULL,
conns = NULL,
checks = FALSE
)
df |
Character specifying a server-side data frame. |
outcome |
String specifying outcome variable within |
group_var |
String specifying grouping variable within 'df'. |
intervals |
Optionally, numeric vector defining how to stratify
|
conns |
DataSHIELD connections object. |
checks |
Logical; if TRUE checks are performed prior to running the function. Default is TRUE. |
Tibble containing mean values for each strata of group_var
.
Other descriptive functions:
dh.anyData()
,
dh.classDiscrepancy()
,
dh.createTableOne()
,
dh.getStats()
,
dh.lmTab()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.