Unnest a COM(P)ADRE database by spreading the components of CompadreMat into separate list-columns
Source:R/cdb_unnest.R
cdb_unnest.Rd
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)
Usage
cdb_unnest(
cdb,
components = c("matA", "matU", "matF", "matC", "MatrixClassAuthor",
"MatrixClassOrganized", "MatrixClassNumber")
)
See also
Other data management:
cdb_flatten()
,
cdb_id_stages()
,
cdb_id_studies()
,
cdb_id()
,
cdb_mean_matF()
,
cdb_rbind()
,
cdb_unflatten()
,
mpm_elementwise_apply()
,
mpm_mean()
,
mpm_median()
,
mpm_sd()
,
string_representation
Examples
# unnest all components
CompadreUnnest <- cdb_unnest(Compadre)
# unnest select components (matU and MatrixClassAuthor)
CompadreUnnest <- cdb_unnest(Compadre, c("matU", "MatrixClassAuthor"))