h_factor | R Documentation |
Helper function factor inputs in order of appearance, or per the levels that you provide.
h_factor(df, var, levels = NULL, ...)
df |
( |
var |
( |
levels |
( |
... |
other arguments to be passed to |
A factor variable
df <- data.frame(a = c("aa", "a", "aa"))
h_factor(df, var = "a")
h_factor(df, var = "a", levels = c("aa", "a"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.