Skip to contents

An `nrow(df)`-by-`p` matrix `var` is encoded in data frame `df` with the columns `var.1`,...,`var.p` or `var1`,...,`varp`.

Usage

md_decode_matrix(df, var)

Arguments

df

data frame that contains the matrix

var

the symbolic name of the matrix

Value

a matrix

Details

A matrix will be returned with the appropriate ordering denoted by the index, e.g., `a.2` will come before `a.4`. There should be no gaps in the matrix indexes, e.g., if there is `a.4` then there must also be `a.1,a.2,a.3`.