factor_data | R Documentation |
Creates a single group variable from the data x
.
factor_data( x, select = NULL, out = c("data.frame", "matrix", "vector"), exclude = NULL, na.action = stats::na.pass, ..., title = NULL )
x |
vector, matrix, or data frame |
select |
vector: indicating columns to select (default: |
out |
output as |
exclude |
vector: values to be excluded when forming the set of levels (default: |
na.action |
a function which indicates what should happen when the data contain NAs (default: stats::na.pass) |
... |
further parameters to character_data |
title |
character: title attribute (default |
a one-column matrix with the merged groups
factor_data(iris$Species, out="vector") factor_data(iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.