Learn R Programming

em (version 1.0.0)

flatten: Flatten a data.frame or matrix by column or row with its name. The name will be transformed into the number of row/column plus the name of column/row separated by `.`.

Description

Flatten a data.frame or matrix by column or row with its name. The name will be transformed into the number of row/column plus the name of column/row separated by `.`.

Usage

flatten(x, by = c("col", "row"))

Value

a flattened vector with names

Arguments

x

a data.frame or matrix.

by

either by column or by row.