getFactorLevels: Find the unique combination of levels of a set of "factors"...

View source: R/getFactorLevels.R

getFactorLevelsR Documentation

Find the unique combination of levels of a set of "factors" in a dataframe

Description

Returns the unique combination of levels of the specified "factors" in a dataframe.

Usage

getFactorLevels(
  dfr,
  factors,
  sortBy = NULL,
  ascending = TRUE,
  orthogonal = FALSE,
  debug = FALSE
)

Arguments

dfr
  • input dataframe (or object that can be cast to a dataframe)

factors
  • vector of desired factor names from dfr

sortBy
  • vector of factor names to sort by (in order of precedence)

ascending
  • flag (T/F) to sort in ascending/descending order

orthogonal
  • flag (T/F) to form orthogonal combination of individual factors

debug
  • flag (T/F) to print debugging info

Value

a dataframe containing each unique combination of factor levels in dfr


wStockhausen/wtsUtilities documentation built on March 16, 2024, 10:38 a.m.