View source: R/sort_parameters.R
sort_parameters | R Documentation |
Sort parameters by coefficient values
sort_parameters(x, ...)
## Default S3 method:
sort_parameters(x, sort = "none", column = "Coefficient", ...)
x |
A data frame or a |
... |
Arguments passed to or from other methods. |
sort |
If |
column |
The column containing model parameter estimates. This will be
|
A sorted data frame or original object.
# creating object to sort (can also be a regular data frame)
mod <- model_parameters(stats::lm(wt ~ am * cyl, data = mtcars))
# original output
mod
# sorted outputs
sort_parameters(mod, sort = "ascending")
sort_parameters(mod, sort = "descending")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.