metacommunity {rdiversity} | R Documentation |
Metacommunity
Description
Functions to generate a metacommunity
object.
Usage
metacommunity(partition, similarity)
## S4 method for signature 'data.frame,missing'
metacommunity(partition)
## S4 method for signature 'numeric,missing'
metacommunity(partition)
## S4 method for signature 'matrix,missing'
metacommunity(partition)
## S4 method for signature 'missing,similarity'
metacommunity(partition, similarity)
## S4 method for signature 'numeric,similarity'
metacommunity(partition, similarity)
## S4 method for signature 'data.frame,similarity'
metacommunity(partition, similarity)
## S4 method for signature 'matrix,similarity'
metacommunity(partition, similarity)
Arguments
partition |
two-dimensional |
similarity |
(optional) object of class |
Value
metacommunity()
returns an object of class
metacommunity
(see Fields).
Fields
type_abundance
two-dimensional
matrix
of modenumeric
with rows as types (species), columns as subcommunities, and each element containing the relative abundance of types in each subcommunity relative to the metacommunity as a whole. In the phylogenetic case, this corresponds to the proportional abundance of historical species, which is calculated from the proportional abundance of terminal taxasimilarity
two-dimensional
matrix
of modenumeric
with rows as types, columns as types, and elements containing pairwise similarities between typessimilarity_components
list containing the components necessary to calculate similarity. This list is empty when
precompute_dist = TRUE
when calculating distance. When a pairwise distance matrix is too large andprecompute_dist = FALSE
, this list contains all the information required to calculate pairwise distance between typessimilarity_parameters
list containing parameters associated with converting pairwise distances to similarities (the
dist2sim()
arguments)ordinariness
two-dimensional
matrix
of modenumeric
with rows as types, columns as subcommunities, and elements containing the ordinariness of types within subcommunitiessubcommunity_weights
vector
of modenumeric
containing subcommunity weightstype_weights
two-dimensional
matrix
of modenumeric
, with rows as types, columns as subcommunities, and elements containing weights of types within a subcommunitydat_ID
object of class
character
denoting the type of diversity being calculated. This can be "naive", "genetic", "taxonomic", and so onraw_abundance
[Phylogenetic] two-dimensional
matrix
of modenumeric
with rows as types, columns as subcommunities, and elements containing the relative abundance of present day speciesraw_structure
[Phylogenetic] two-dimensional
matrix
of modenumeric
with rows as historical species, columns as present day species, and elements containing historical species lengths within lineagesparameters
[Phylogenetic]
data.frame
containing parameters associated with each historic species in the phylogeny
See Also
Examples
# Naive-type
partition <- cbind(a = c(1,1,1,0,0), b = c(0,1,0,1,1))
row.names(partition) <- paste0("sp", 1:5)
partition <- partition / sum(partition)
meta <- metacommunity(partition)