add_multi_missing_species {DAISIEprep}R Documentation

Calculates the number of missing species to be assigned to each island clade in the island_tbl object and assigns the missing species to them. In the case that multiple genera are in an island clade and each have missing species the number of missing species is summed. Currently the missing species are assigned to the genus that first matches with the missing species table, however a more biologically or stochastic assignment is in development.

Description

Calculates the number of missing species to be assigned to each island clade in the island_tbl object and assigns the missing species to them. In the case that multiple genera are in an island clade and each have missing species the number of missing species is summed. Currently the missing species are assigned to the genus that first matches with the missing species table, however a more biologically or stochastic assignment is in development.

Usage

add_multi_missing_species(missing_species, missing_genus, island_tbl)

Arguments

missing_species

Numeric number of missing species from the phylogeny that belong to the colonising clade. For a clade with missing species this is n - 1, where n is the number of missing species in the clade. If the clade is an island singleton, the number of missing species is 0 because by adding the colonist it already counts as one automatically. If the clade has more than one species, the missing_species is n - 1 because adding the lineage already counts as one.

missing_genus

A list of character vectors containing the genera in each island clade

island_tbl

An instance of the Island_tbl class.

Value

Object of Island_tbl class

Examples

phylod <- create_test_phylod(test_scenario = 6)
island_tbl <- suppressWarnings(extract_island_species(
  phylod = phylod,
  extraction_method = "asr",
))
phylod <- create_test_phylod(test_scenario = 7)
island_tbl <- suppressWarnings(extract_island_species(
  phylod = phylod,
  extraction_method = "asr",
  island_tbl = island_tbl
))

missing_species <- data.frame(
  clade_name = "bird",
  missing_species = 1,
  endemicity_status = "endemic"
)

missing_genus <- list("bird", character(0))

island_tbl <- add_multi_missing_species(
  missing_species = missing_species,
  missing_genus = missing_genus,
  island_tbl = island_tbl
)

[Package DAISIEprep version 0.4.0 Index]