View source: R/export-DataPreprocessing.R
aggregate_df | R Documentation |
Aggregates specified columns of a data frame into summarizing statistics, preserving the potentially complex structure returned by aggregator functions (like data frames or inla.mdata objects) within list-columns. Aggregation is performed according to sufficient statistics for the specified distribution of the columns. Possible distributions: Gaussian, binomial. This function aggregates the entire data frame into a single row result.
aggregate_df(
data,
gaussian = NULL,
gaussian.precision.scales = NULL,
binomial = NULL
)
data |
A data frame. |
gaussian |
Gaussian columns in |
gaussian.precision.scales |
Scales for the precision of Gaussian observations.
|
binomial |
Binomial columns in |
A single-row data frame (tibble) containing:
A column n
with the total number of rows in the input data.
For each specified column in gaussian
, binomial
, a corresponding
list-column (named e.g., colname_gaussian
, colname_binomial
.
Each element of these list-columns can be accessed by using the $
operator twice, e.g. through data$colname_gaussian$Y1
for the first element of the Gaussian summary.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.