Description Usage Arguments Details Value
Because the births
data set uses a weighted record strategy (i.e. you have to
multiply everything by the cases field), the typical summary function won't return meaningful
results. In order to provide some basic descriptive statistics for a numeric column in the data
set, this function can be used instead.
1 2 | numeric_summary(data, numeric_column, weight_column = "cases",
na.rm = FALSE)
|
data |
a data frame, presumably the births data set or a derivative |
numeric_column |
the numeric column that you want to perform summary statistics on |
weight_column |
the column in the data.frame that contains the weighting value |
na.rm |
whether to pass a TRUE or FALSE value to the na.rm argument for each underlying aggregation function. |
It makes use of the dplyr format for summarizing results, and therefore integrates nicely with a
chain of dplyr functions. Under the hood, it is using summarize_
and pasting
strings together for evaluation, with the actual statistics being handled by the
matrixStats
package, based upon your input.
A formula that can be executed in a dplyr
summarize statement
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.