Description Usage Arguments Value
Will reorder factors based off of a group subset
1 2 | reorderFactor.by(data, factor.to.order, factor.col, by.factor, FUN = NULL,
applied.on, group.by = NULL, decreasing = FALSE)
|
data |
data frame |
factor.to.order |
column name or index of factors that will be reordered |
factor.col |
column name or index that contains 'by.factor' |
by.factor |
character name of factor in factor.col that data will be subsetted for calculations and group desired for order |
FUN |
Simple function that takes a vector of numbers and returns a single output. Default set to NULL, must assign a function if group.by is not NULL. |
applied.on |
Numeric vector used as inputs to FUN. Will ultamitly determine order of factor.to.order |
group.by |
column names or indexes that further groups by.factor subset to which FUN is applied. Default set to NULL. |
decreasing |
logical, default set to FALSE. Determines if order is increasing or decreasing. |
returns data with factor.to.order reordered by FUN of by.factor subsetted through group.by.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.