Description Usage Arguments Details Value Examples
View source: R/ordered_factor.R
Creates an ordered factor based on order of another variable
1 |
var |
variable to be converted into a factor |
seq |
variable that implies the sequence of |
This function helps to re-order groups in a ggplot2
plot. See example below.
factor(var)
with the implied order by seq
.
1 2 3 4 | val <- rpois(10,100)
num <- sample(seq(1,10))
levels(ordered_factor(val, num))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.