| cdb_flatten {Rcompadre} | R Documentation |
Convert a COM(P)ADRE database to a flat data frame with matrices and vectors stored in string representation
Description
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).
Usage
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(s)
Owen R. Jones <jones@biology.sdu.dk>
Patrick M. Barks <patrick.barks@gmail.com>
See Also
cdb_unflatten string_representation
Other data management:
cdb_id_stages(),
cdb_id_studies(),
cdb_id(),
cdb_mean_matF(),
cdb_rbind(),
cdb_unflatten(),
cdb_unnest(),
mpm_mean(),
mpm_median(),
mpm_sd(),
string_representation
Examples
CompadreFlat <- cdb_flatten(Compadre)