View source: R/descriptive_functions.R
estat | R Documentation |
estat
calculates descriptives of numerical variables.
estat(object = NULL, formula = NULL, data = NULL, digits = 2, label = NULL)
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). |
A data frame with descriptive statistics.
summary
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.