| as_factor | R Documentation | 
Coerce to factor vector
as_factor(x, ...)
| x | A vector created with  | 
| ... | Further arguments passed to internal methods (not used). | 
A factor vector.
sex <- defined(
  c(0, 1, 1, 0),
  label = "Sex",
  labels = c("Female" = 0, "Male" = 1)
)
as_factor(sex)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.