Description Usage Arguments Value See Also Examples
Quick displays of tendency and distribution of variables recorded in
repetitions may be required for plotting dots with error bars. The function
summary_stats()
retrieves a data frame with the tendency and spread
of values of a variable by one or more factors.
Calculation of tendency and distribution parameters for variables grouped by
a combination of factors. This function is applying
aggregate()
for grouping observations.
In the method 'formula'
, the terms are expressed as variable ~
factors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | summary_stats(x, ...)
## S4 method for signature 'formula'
summary_stats(
x,
trend = mean,
spread = sd,
data,
trend_args = list(),
spread_args = list()
)
## S4 method for signature 'character'
summary_stats(
x,
factors,
trend = mean,
spread = sd,
data,
trend_args = list(),
spread_args = list()
)
|
x |
Either a formula or a character vector with the name of variables. |
... |
Further arguments passed among methods. |
trend, spread |
The trend and spread functions. |
data |
A data frame containing the records. |
trend_args, spread_args |
Lists of further arguments required by the trend and spread functions, respectively. |
factors |
Character vector indicating categorical variables for grouping the values. |
A data frame with one column for the variables, each factor as a column and the values of tendency and dispersion.
1 2 3 4 | data(maize_model)
## The formula method
summary_stats(wrt + wst + wglv + wgld + yield ~ treatment, data=maize_model)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.