Unnests a CompadreDB object by spreading the components of CompadreMat into separate list-columns. Components that may be extracted include:

  • matA (matrix)

  • matU (matrix)

  • matF (matrix)

  • matC (matrix)

  • MatrixClassAuthor (character vector)

  • MatrixClassOrganized (character vector)

  • MatrixClassNumber (integer vector)

cdb_unnest(
  cdb,
  components = c("matA", "matU", "matF", "matC", "MatrixClassAuthor",
    "MatrixClassOrganized", "MatrixClassNumber")
)

Arguments

cdb

A CompadreDB object

components

Character vector specifying which components to extract.

Defaults to all, i.e. c("matA", "matU", "matF", "matC", "MatrixClassAuthor", "MatrixClassOrganized", "MatrixClassNumber")

Value

cdb with additional list-columns for each element of argument components

See also

Author

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

Examples

# unnest all components CompadreUnnest <- cdb_unnest(Compadre) # unnest select components (matU and MatrixClassAuthor) CompadreUnnest <- cdb_unnest(Compadre, c("matU", "MatrixClassAuthor"))