bodysize | R Documentation |
Calculates body size in dry weight (mg) from Kendall et al. (2018) using ITD (and co-variate) values.
bodysize(x, taxa, type)
x |
A data frame with columns containing 'ITD' values and Sex ('Male' or 'Female'). Optional attributes depending on model choice: Taxonomy ('Family' for bees or 'Subfamily for hoverflies), 'Region' (Currently only "NorthAmerica", "SouthAmerica", "Australasia" and "Europe" implemented) and 'Species' ("Genus_species" format). Non-implemented regions and/or species are acceptable. See details. |
taxa |
A vector specifying insect taxa of interest, can be either "bee" for bee models and "hov" for hoverfly models |
type |
A vector specifying model type to be used: for bees this can be either "taxo" for the full taxonomic model, "phy" for the full phylogenetic model, "sex" for the reduced sexual dimorphic model or "ITD" for the ITD-only model. In hoverflies: this can either be "taxo" for the full taxonomic model, "sex" for the reduced sexual dimorphic model or "ITD" for the ITD-only model. |
For bees, type option 'taxo' requires ITD, sex and taxonomic family. Type option 'phylo' only requires ITD and Sex to run but should be only be used for with Species (and Region) included in model formulation n.b. the function checks for contained species.
For hoverflies, type 'taxo' requires ITD, Subfamily and Sex for each specimen. Type "ITD" for both taxa only requires ITD values (Optional: region and species but check 'setdiff'). If specimens are from included regions or species (see above) we recommend including these as additional columns. Estimates (and variance components) are returned as four additional columns bound to the original dataframe. In the likely case that non-represented taxa and regions are included in inputted datasets, 'allow_new_levels' is set to true for all models. Estimates will then be modelled with group-level uncertainty in the predictions based on the variation of the existing levels. This function makes use of external model objects hosted on GitHub. In the case of slow loading, we recommend you download the pollimetrydata package from https://github.com/liamkendall/pollimetrydata.
The original dataframe (x) along with additional columns of body size, and 90
Kendall et al. (2019) Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9(4), 1702-1714. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/ece3.4835")}.
ITD=c(1.3,2.3)
Sex=c("Female","Male")
Subfamily=c("Syrphinae","Eristalinae")
Region=c("Australasia","Europe")
Species=c("Sphaerophoria_macrogaster","Myathropa_florea")
example.data <- data.frame(ITD,Sex,Subfamily,Region,Species)
bodysize(x=example.data,taxa="hov",type="taxo")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.