A data frame with descriptive statistics for each variable.
Arguments
data
A data frame, matrix, or numeric vector. If a vector is
supplied, it is treated as a single variable and the output's
first column is named "value".
cols
Column indices or names of numeric variables to describe.
If NULL, all numeric columns are used.
stats
Statistic selection from the nine available:
n, na, mean, sd, median,
trimmed, min, max, IQR. Can be a
numeric vector or a character vector of statistic names.
first
Name for the first column of the output, which contains
the variable identifiers.
cores
Number of CPU cores. NULL (default) means single-threaded execution; pass an integer > 0 to enable OpenMP when nrow(x) * ncol(x) > 1e5.
The function accepts vectors, matrices, and data frames. Numeric
columns are required. The calculation is performed entirely in C++
via Rcpp for speed.