flatten: Flatten a data.frame or matrix by column or row with its...

View source: R/utils.R

flattenR Documentation

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

Arguments

x

a data.frame or matrix.

by

either by column or by row.

Value

a flattened vector with names


em documentation built on Jan. 11, 2023, 9:07 a.m.