mat2long: Expand matrix to data.frame via row and column names

Description Usage Arguments Value Examples

View source: R/mat2long.R

Description

Expand matrix to data.frame via row and column names

Usage

1

Arguments

x

a matrix with row and column names

Value

a data.frame with row names in the Rx column, and the column names in the Cx column, and values in the val column

Examples

1
2
3
4
x <- matrix(1:20, ncol=4)
rownames(x) <- paste0("r", 1:5)
colnames(x) <- paste0("c", 1:4)
mat2long(x)

gobbios/cfp documentation built on July 15, 2018, 3:45 p.m.