Skip to contents

Data acquisition

Functions for acquiring data from COMPADRE/COMADRE.

cdb_build_cdb()
Create a CompadreDB object from user-specified data
cdb_fetch()
Fetch the COM(P)ADRE database from compadre-db.org or a local file
cdb_metadata()
Extract metadata from a COM(P)ADRE database

Data checking

Functions for checking data.

cdb_check_species()
Check whether a COM(P)ADRE database contains one or more species of interest
cdb_collapse()
Collapse a COM(P)ADRE database by averaging matrices over levels of one or more grouping variables
cdb_compare()
Compare two versions or subsets of a COM(P)ADRE database
cdb_flag()
Flag potential issues in matrices of a COM(P)ADRE database
mpm_has_prop() mpm_has_active() mpm_has_dorm() mpm_first_active()
Extract stage-class information from CompadreMat or CompadreDB objects

Data management

Functions for manipulating and managing data.

cdb_flatten()
Convert a COM(P)ADRE database to a flat data frame with matrices and vectors stored in string representation
cdb_id()
Create integer identifiers for a COM(P)ADRE database corresponding to unique combinations of a given set of columns
cdb_id_stages()
Create integer identifiers for a COM(P)ADRE database corresponding to unique combinations of species and matrix stage class definitions
cdb_id_studies()
Create a vector of unique study identifiers from a COM(P)ADRE database
cdb_mean_matF()
Calculate a population-specific mean fecundity matrix for each set of matrices in a COM(P)ADRE database
cdb_rbind()
Merge two COM(P)ADRE databases via row-bind
cdb_unflatten()
Reconstitute a flattened COM(P)ADRE database (created by cdb_flatten) as a CompadreDB object
cdb_unnest()
Unnest a COM(P)ADRE database by spreading the components of CompadreMat into separate list-columns
mat_elementwise_apply() mpm_elementwise_apply()
Apply a function element-wise to a list of matrices
mat_mean() mpm_mean()
Calculate a mean over a list of matrices or CompadreMat objects
mat_median() mpm_median()
Calculate a median over a list of matrices or CompadreMat objects
mat_sd() mpm_sd()
Calculate a standard deviation over a list of matrices or CompadreMat objects
mat_to_string() vec_to_string() string_to_mat() string_to_vec()
Convert vectors or square numeric matrices to and from string representation

All functions

All functions listed alphabetically.

Compadre Comadre
Subsamples of the COMPADRE Plant Matrix Database and COMADRE Animal Matrix Database for testing and examples
as.data.frame(<CompadreDB>) as_tibble(<CompadreDB>) head(<CompadreDB>) tail(<CompadreDB>) names(<CompadreDB>) dim(<CompadreDB>) merge(<CompadreDB>) NumberAcceptedSpecies() NumberStudies() NumberMatrices()
Methods for CompadreDB objects
`[`(<CompadreDB>,<ANY>,<ANY>,<ANY>) subset(<CompadreDB>)
Subsetting CompadreDB objects
fortify.CompadreDB() filter.CompadreDB() slice.CompadreDB() arrange.CompadreDB() mutate.CompadreDB() group_by.CompadreDB() ungroup.CompadreDB() summarize.CompadreDB() summarise.CompadreDB() select.CompadreDB() rename.CompadreDB() left_join.CompadreDB() right_join.CompadreDB() inner_join.CompadreDB() full_join.CompadreDB()
Tidyverse methods for CompadreDB objects
CompadreData() `$`(<CompadreDB>) `$<-`(<CompadreDB>) `[[`(<CompadreDB>,<ANY>,<missing>) `[[<-`(<CompadreDB>,<ANY>,<missing>) VersionData() Version() DateCreated()
CompadreDB Class
CompadreLegacy
Subsample of a legacy version of the COMPADRE Plant Matrix Database for testing and examples
matA() matU() matF() matC() matrixClass() MatrixClassAuthor() MatrixClassOrganized() MatrixClassNumber()
Methods for working with matrices in com(p)adre
as_cdb()
Convert legacy COM(P)ADRE database object to CompadreDB
cdb_build_cdb()
Create a CompadreDB object from user-specified data
cdb_check_species()
Check whether a COM(P)ADRE database contains one or more species of interest
cdb_collapse()
Collapse a COM(P)ADRE database by averaging matrices over levels of one or more grouping variables
cdb_compare()
Compare two versions or subsets of a COM(P)ADRE database
cdb_fetch()
Fetch the COM(P)ADRE database from compadre-db.org or a local file
cdb_flag()
Flag potential issues in matrices of a COM(P)ADRE database
cdb_flatten()
Convert a COM(P)ADRE database to a flat data frame with matrices and vectors stored in string representation
cdb_id()
Create integer identifiers for a COM(P)ADRE database corresponding to unique combinations of a given set of columns
cdb_id_stages()
Create integer identifiers for a COM(P)ADRE database corresponding to unique combinations of species and matrix stage class definitions
cdb_id_studies()
Create a vector of unique study identifiers from a COM(P)ADRE database
cdb_mean_matF()
Calculate a population-specific mean fecundity matrix for each set of matrices in a COM(P)ADRE database
cdb_metadata()
Extract metadata from a COM(P)ADRE database
cdb_rbind()
Merge two COM(P)ADRE databases via row-bind
cdb_unflatten()
Reconstitute a flattened COM(P)ADRE database (created by cdb_flatten) as a CompadreDB object
cdb_unnest()
Unnest a COM(P)ADRE database by spreading the components of CompadreMat into separate list-columns
mat_elementwise_apply() mpm_elementwise_apply()
Apply a function element-wise to a list of matrices
mat_mean() mpm_mean()
Calculate a mean over a list of matrices or CompadreMat objects
mat_median() mpm_median()
Calculate a median over a list of matrices or CompadreMat objects
mpm_has_prop() mpm_has_active() mpm_has_dorm() mpm_first_active()
Extract stage-class information from CompadreMat or CompadreDB objects
mat_sd() mpm_sd()
Calculate a standard deviation over a list of matrices or CompadreMat objects
mat_to_string() vec_to_string() string_to_mat() string_to_vec()
Convert vectors or square numeric matrices to and from string representation