flatten_mx_to_row: Flatten a vector or matrix (r,c) into a single row matrix...

flatten_mx_to_rowR Documentation

Flatten a vector or matrix (r,c) into a single row matrix (1,c) creating new column names from a combination of old rownames and colnames.

Description

A single row matrix, unlike a vector, has the advantage that it can have a row name.

eg: A1, A2, B1, B2

Usage

flatten_mx_to_row(mx, row.names.first = FALSE)

Arguments

mx

matrix

row.names.first

if TRUE, row.names will appear first in the names of the resultant columns, eg: becomes A1,B1,A2,B2 else row.names will appear last, eg: 1A, 1B, 2A, 2B

Value

a single row matrix (1,c)


kcha193/simarioV2 documentation built on March 4, 2023, 9:47 p.m.