Summarize numeric variables
Usage
summarize(
x,
varname,
group_by = NULL,
type = c("all", "median-range", "mean-sd"),
na.rm = TRUE
)
Arguments
- x
data.frame or data.table (will be coerced to data.table)
- varname
Character, vector: Variable name(s) to summarize. Must be column names in
x
of type numeric.- group_by
Character, vector: Variable name(s) of factors to group by. Must be column names in
x
.- type
Character: "all", "median-range" or "mean-sd". which returns Mean, SD, Median, Range, NA (number of NA values)
- na.rm
Logical: Passed to
median
andmean
.