unstackDF: Unstacking a data.frame object

Description Usage Arguments

View source: R/unstackDF.R

Description

This function reliably unstacks a data frame into a matrix

Usage

1
unstackDF(df, row_id, col_id, value_id, na_value = NA)

Arguments

df

The input data.frame object

row_id

An integer indicating the column id which specifies the rows of the unstacked matrix

col_id

An integer indicating the column id which specifies the columns of the unstacked matrix

value_id

An integer indicating the column id which specifies the values to be filled in the unstacked matrix.

na_value

Specifies whether to replace NA values, such as from missing row/column combinations. Defaults to "NA" (no replacement).


wayneliuq/wmisc documentation built on Dec. 23, 2021, 5:08 p.m.