View source: R/DAISIE_dataprep.R
DAISIE_dataprep | R Documentation |
This function produces a data object that can be run in DAISIE likelihood computation/optimization functions. The function converts a user-specified table to a DAISIE-compatible format. See Galapagos_datatable.Rdata for a template of an input table.)
DAISIE_dataprep(
datatable,
island_age,
M,
number_clade_types = 1,
list_type2_clades = NA,
prop_type2_pool = "proportional",
epss = 1e-05,
verbose = TRUE
)
datatable |
Data frame (table) with user-specified data. See file
Galapagos_datatable.Rdata for a template of an input table. Each row on the
table represents and independent colonisation event. Table has the following
four columns. |
island_age |
Age of island in appropriate units |
M |
The size of the mainland pool, i.e the number of species that can potentially colonize the island |
number_clade_types |
Number of clade types. Default: number_clade_types = 1 all species are considered to belong to same macroevolutionary process. If number_clade_types = 2, there are two types of clades with distinct macroevolutionary processes. |
list_type2_clades |
If number_clade_types = 2, list_type2_clades specifies the names of the clades that have a distinct macroevolutionary process. The names must match those in the $Clade_name column of the source data table (e.g. list_type2_clades = "Finches"). If number_clade_types = 1, then list_type2_clades = NA should be specified (default) |
prop_type2_pool |
Specifies the fraction of potential mainland colonists that have a distinct macroevolutionary process. Applies only if number_clade_types = 2. Default "proportional" sets the fraction to be proportional to the number of clades of distinct macroevolutionary process that have colonised the island. Alternatively, the user can specify a value between 0 and 1 (e.g. if mainland pool size is 1000 and prop_type2_pool = 0.02 then number of type2 species is 20). |
epss |
Default= 1E-5 should be appropriate in most cases. This value is used to set the maximum age of colonisation of "Non_endemic_MaxAge" and "Endemic_MaxAge" species to an age that is slightly younger than the island for cases when the age provided for that species is older than the island. The new maximum age is then used as an upper bound to integrate over all possible colonisation times. |
verbose |
Boolean. States if intermediate results should be printed to
console. Defaults to |
The output is an R list containing the data formatted to be run on other DAISIE functions.
datalist |
R list object containing data: |
Luis M Valente
Valente, L.M., A.B. Phillimore and R.S. Etienne (2015). Equilibrium and non-equilibrium dynamics simultaneously operate in the Galapagos islands. Ecology Letters 18: 844-852.
### Create Galapagos data object where all taxa have the same macroevolutionary process
utils::data(Galapagos_datatable, package = "DAISIE")
DAISIE_dataprep(
datatable = Galapagos_datatable,
island_age = 4,
M = 1000
)
### Create Galapagos data object with a distinct macroevolutionary processes
# for the Darwin's finches. One process applies to type 1 species (all species
# except for Darwin's finches) and the other applies only to type 2 species
# (Darwin's finches). Set fraction of potential colonists of type 2 to be
# proportional to the number of type2 clades present on the island.
utils::data(Galapagos_datatable, package = "DAISIE")
DAISIE_dataprep(
datatable = Galapagos_datatable,
island_age = 4,
M = 1000,
number_clade_types = 2,
list_type2_clades = "Finches"
)
### Create Galapagos data object with a distinct macroevolutionary processes
# for the Darwin's finches. One process applies to type 1 species (all species
# except for Darwin's finches) and the other applies only to type 2 species
# (Darwin's finches). Set fraction of potential colonists of type 2 to be 0.163.
utils::data(Galapagos_datatable, package = "DAISIE")
DAISIE_dataprep(
datatable = Galapagos_datatable,
island_age = 4,
M = 1000,
number_clade_types = 2,
list_type2_clades = "Finches",
prop_type2_pool = 0.163
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.