unstackDataframe: Unstack columns in a dataframe by a set of factor levels

View source: R/unstackDataframe.R

unstackDataframeR Documentation

Unstack columns in a dataframe by a set of factor levels

Description

Creates a new dataframe by "unstack"ing columns in the input dataframe by factor level combinations in a set of other columns. Uses getFactorLevels to find the unique factor level combinations from the set of dataaframe columns identified as factors.

Usage

unstackDataframe(
  dfr,
  unstackCols = NULL,
  factorCols = NULL,
  dropCols = NULL,
  debug = TRUE
)

Arguments

dfr
  • the dataframe

unstackCols
  • the names of the columns to unstack

factorCols
  • a vector of names of columns to use as factors

dropCols
  • a vector of names of columns to drop from the result

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

Details

None.

Value

dataframe with unstacked columns and factor levels


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