Converts a CompadreDB object to a flat data frame by extracting the data slot, and splitting the mat column into separate columns for each component (matrices matA, matU, matF, matC, and vectors MatrixClassAuthor, and MatrixClassOrganized). The component matrices and vectors within the six new columns are stored in string format so that the database can be written to a flat file format such as csv (see string_representation).

cdb_flatten(cdb)

Arguments

cdb

A CompadreDB object

Value

A data frame based on the data slot of cdb, but with the column mat replaced by six separate columns (for matrices

matA, matU, matF, matC, and vectors

MatrixClassAuthor, and MatrixClassOrganized), whose elements are matrices or vectors in string representation.

Author

Owen R. Jones <jones@biology.sdu.dk>

Patrick M. Barks <patrick.barks@gmail.com>

Examples

CompadreFlat <- cdb_flatten(Compadre)