factor_data: factor_data

factor_dataR Documentation

factor_data

Description

Creates a single group variable from the data x.

Usage

factor_data(
  x,
  select = NULL,
  out = c("data.frame", "matrix", "vector"),
  exclude = NULL,
  na.action = stats::na.pass,
  ...,
  title = NULL
)

Arguments

x

vector, matrix, or data frame

select

vector: indicating columns to select (default: NULL)

out

output as data.frame (default), matrix, or vector

exclude

vector: values to be excluded when forming the set of levels (default: NULL)

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 NULL)

Value

a one-column matrix with the merged groups

Examples

factor_data(iris$Species, out="vector")
factor_data(iris)

sigbertklinke/smvgraph documentation built on Dec. 10, 2022, 9:13 a.m.