View source: R/cdb_mean_matF.R
cdb_mean_matF | R Documentation |
Takes a CompadreDB object and calculates a grand mean fecundity matrix for
each unique population (a mean of all population-specific fecundity matrices,
including fecundity matrices for which MatrixComposite == 'Mean'
).
Populations are defined based on unique combinations of the columns 'SpeciesAuthor', 'MatrixPopulation', and 'MatrixDimension', (or optionally, a different set of columns supplied by the user).
The main purpose of this function is to identify stage classes that are potentially reproductive (i.e. the absence of fecundity in a given stage class and year does not necessarily indicate that the stage in question is non-reproductive).
cdb_mean_matF(
cdb,
columns = c("SpeciesAuthor", "MatrixPopulation", "MatrixDimension")
)
cdb |
A CompadreDB object |
columns |
Vector of column names from which unique populations should be
identified. Defaults to |
Returns a list of matrices, representing the mean fecundity matrix associated with each row of the database.
Owen R. Jones <jones@biology.sdu.dk>
Danny Buss <dlb50@cam.ac.uk>
Julia Jones <juliajones@biology.sdu.dk>
Iain Stott <stott@biology.sdu.dk>
Patrick Barks <patrick.barks@gmail.com>
Other data management:
cdb_flatten()
,
cdb_id_stages()
,
cdb_id_studies()
,
cdb_id()
,
cdb_rbind()
,
cdb_unflatten()
,
cdb_unnest()
,
mpm_elementwise_apply()
,
mpm_mean()
,
mpm_median()
,
mpm_sd()
,
string_representation
# print matF associated with row 16 of database
Compadre$mat[[16]]
# create list of meanMatFs
meanF <- cdb_mean_matF(Compadre)
# print meanMatF associated with row 16 of database
meanF[[16]]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.