estat {pubh} | R Documentation |
Descriptive statistics for continuous variables.
Description
estat
calculates descriptives of numerical variables.
Usage
estat(object = NULL, formula = NULL, data = NULL, digits = 2, label = NULL)
Arguments
object |
When chaining, this holds an object produced in the earlier portions of the chain. Most users can safely ignore this argument. See details and examples. |
formula |
A formula with shape: ~ x or ~ x|z (for groups). |
data |
A data frame where the variables in the |
digits |
Number of digits for rounding (default = 2). |
label |
Label used to display the name of the variable (see examples). |
Value
A data frame with descriptive statistics.
See Also
Examples
data(kfm, package = "ISwR")
require(sjlabelled, quietly = TRUE)
kfm <- kfm %>%
var_labels(
dl.milk = "Breast-milk intake (dl/day)",
sex = "Sex",
weight = "Child weight (kg)",
ml.suppl = "Milk substitute (ml/day)",
mat.weight = "Maternal weight (kg)",
mat.height = "Maternal height (cm)"
)
kfm %>%
estat(~dl.milk)
estat(~ dl.milk | sex, data = kfm)
kfm %>%
estat(~ weight | sex)
[Package pubh version 1.3.2 Index]