| Type: | Package |
| Title: | Estimate Pollinator Body Size and Co-Varying Ecological Traits |
| Version: | 1.1.1-1 |
| Maintainer: | Liam Kendall <liam.k.kendall@gmail.com> |
| Description: | Tools to estimate pollinator body size and co-varying traits. This package contains Bayesian predictive models of pollinator body size (for bees and hoverflies) and bee foraging range, as well as preexisting predictive models for pollinator body size (currently implemented for ants, bees, butterflies, flies, moths and wasps), bee tongue length, foraging range, total field nectar loads and wing loading. An additional GitHub repository https://github.com/liamkendall/pollimetrydata provides model objects to use the bodysize and foraging.range functions internally. The Bayesian models are described in Kendall et al. (2019) <doi:10.1002/ece3.4835> & Kendall et al. (2022) <doi:10.1002/ecy.3809>. |
| Depends: | R (≥ 4.0.0) |
| Imports: | stats, utils, lifecycle, brms (≥ 2.16.1) |
| Suggests: | pollimetrydata (≥ 1.0.1) |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| LazyData: | true |
| Encoding: | UTF-8 |
| Config/roxygen2/version: | 8.1.1 |
| URL: | https://github.com/liamkendall/pollimetry |
| BugReports: | https://github.com/liamkendall/pollimetry/issues |
| NeedsCompilation: | no |
| Packaged: | 2026-11-09 21:44:51 UTC; liamkendall |
| Author: | Liam Kendall [aut, cre], Ignasi Bartomeus [aut] |
| Repository: | CRAN |
| Date/Publication: | 2026-11-10 08:10:15 UTC |
Predict bee and hoverfly dry body weight
Description
Predict dry body weight (mg) from intertegular distance and covariates using the fitted models of Kendall et al. (2019).
Usage
bodysize(x, taxa, type)
Arguments
x |
A nonempty data frame with positive, finite ITD measurements in mm. Sex (Female or Male) is required except for type = "ITD". Taxonomic models also require Family for bees or Subfamily for hoverflies. Accepted hoverfly subfamilies are Eristalinae, Pipizinae and Syrphinae. Optional grouping columns are Region and Species (Genus_species); Species requires Region. The phylogenetic model requires both Region and Species. |
taxa |
One string: "bee" or "hov". |
type |
One string: "taxo", "sex", "ITD", or "phylo" (bees only). |
Details
With Region and Species, both fitted grouping effects are included. With Region alone, the regional effect is included. Population-level predictions use group effects set to zero. Species requires Region because the fitted species effect is nested within Region. New grouping levels use brms uncertainty sampling from existing levels. Fixed-effect categories must be supported by the fitted model. Estimates are back-transformed means with 95 percent Bayesian credible intervals, expressed in milligrams. Uses fitted models from pollimetrydata (>= 1.0.1) when installed, or downloads the required models from GitHub and caches them for the current R session.
Value
The input data frame with Est.Weight and 95 percent Bayesian credible intervals (CI_Lower and CI_Upper) appended, in mg.
References
Kendall et al. (2019). Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9, 1702-1714. doi:10.1002/ece3.4835.
Examples
if (requireNamespace("pollimetrydata", quietly = TRUE) &&
utils::packageVersion("pollimetrydata") >= "1.0.1") {
x <- data.frame(ITD = c(1.5, 2), Sex = c("Female", "Male"),
Subfamily = c("Pipizinae", "Syrphinae"))
bodysize(x, taxa = "hov", type = "taxo")
}
Bee foraging range measurements.
Description
A dataset of 425 foraging range estimates, with body size, sociality, taxonomic and study metadata.
Usage
data(forage_dataset)
Format
A data frame with 425 rows and 23 columns.
publicationSource publication.
yearPublication year.
regionGeographical region.
countryStudy country.
habitatStudy habitat.
familyBee family.
genusBee genus.
speciesBee species.
sexBee sex.
range.typeForaging range category.
measure.typePotential or realized range.
metricMethod used to measure foraging range.
NReported sample size.
distanceReported foraging distance in metres.
sdReported standard deviation.
seReported standard error.
ci95Reported 95 percent confidence interval.
itdIntertegular distance in mm.
socialitySocial organisation.
notesOriginal study notes.
dist10Base-10 logarithm of foraging distance in kilometres.
range.4Combined range and measure category.
wgt10Base-10 logarithm of predicted body mass in mg.
Details
The model_training attribute identifies the training data for two foraging range models. Stored model variables are populated for the corresponding training subsets.
References
Kendall et al. (2022). The potential and realized foraging movements of bees are differentially determined by body size and sociality. Ecology, 103(11), e3809. doi:10.1002/ecy.3809.
(Deprecated) Converts body measurements to measures of foraging range for bees.
Description
This function is now deprecated and has been superseded by 'foraging.range'
Calculates foraging range from Greenleaf et al. (2007) using intertegular distance (ITD) values, van Nieuwstadt and Iraheta (1996) using head width (HW) values for Meliponini (stingless bees) and Guedot et al. (2009) using dry weight (mg) values for Osmia species.
Usage
foragedist(x, type = "GreenleafAll")
Arguments
x |
A nonempty numeric vector of finite, positive measurements: intertegular distance (mm) for Greenleaf equations, head width (mm) for Meli equations, or dry body weight (mg) for Osmia. |
type |
A single character string selecting the equation or equation group. Options are "GreenleafAll", GrMhd ("Maximum homing distance"), GrThd ("Typical homing distance"), GrMfd ("Maximum feeder training distance"), GrMcd("Maximum communication distance"),"Osmia", "MeliMR" , "MeliFT" or "MeliAll". See details in Greenleaf et al. (2007), Guedot et al. (2009) and van Nieuwstadt and Iraheta (1996). |
Details
Negative estimates from linear equations indicate extrapolation beyond their applicable measurement range.
Value
A numeric vector for a single equation, or a named-column matrix for GreenleafAll and MeliAll. Greenleaf estimates are in kilometres; Meliponini and Osmia estimates are in metres. Rows follow input order.
References
Kendall et al. (2019) Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9(4), 1702-1714. doi:10.1002/ece3.4835.
van Nieuwstadt, M. G. L., and Ruano Iraheta, C. E. (1996). Relation between size and foraging range in stingless bees (Apidae, Meliponinae). Apidologie, 27(4), 219-228.
Greenleaf et al. (2007) Bee foraging ranges and their relationship to body size. Oecologia, 153, 589-596. doi:10.1007/s00442-007-0752-9.
Guedot et al. (2009). Relationship between body size and homing ability in the genus Osmia (Hymenoptera; Megachilidae). Ecological Entomology, 34(1), 158-161. doi:10.1111/j.1365-2311.2008.01054.x.
Examples
foragedist(c(10,5,2), type = "MeliMR")
Predict typical and maximum bee foraging ranges
Description
Predict realized or potential bee foraging ranges using the models of Kendall et al. (2022).
Usage
foraging.range(
data,
model.type = "social",
random.effects = "reduced",
measure.type = "realized"
)
Arguments
data |
A nonempty data frame with positive, finite ITD measurements in mm. The social model requires sociality: "Highly Eusocial", "Primitively Eusocial" or "Solitary". Group effects require species in Genus_species format; genus is derived from species. |
model.type |
One string: "social" (default) or "ITD". Both models use estimated body weight; the social model also uses sociality. |
random.effects |
One string: "reduced" (default, population-level predictions), "phylo" (genus effect), or "full" (genus and species effects). |
measure.type |
One string: "realized" (default) or "potential". |
Details
Estimates are back-transformed means with 95 percent Bayesian credible intervals, expressed in kilometres. Female body weight is estimated once per input row using population-level predictions from the bee sex model, then reused for both range types. Range estimates and credible intervals are conditional on this estimated body weight. Group effects selected by random.effects contribute to predictions; the remaining group effects are set to zero. New included grouping levels use uncertainty sampling from existing levels. Uses fitted models from pollimetrydata (>= 1.0.1) when installed, or downloads the required models from GitHub and caches them for the current R session.
Value
A data frame with two rows per input specimen, typical then maximum range. Estimated range (range.estimate) and the lower and upper bounds of its 95 percent Bayesian credible interval (range.lower and range.upper) are in kilometres. wgt is estimated female dry weight in mg and wgt10 is its base-10 logarithm. Additional columns include range.type and, when species is supplied, genus.
References
Kendall et al. (2022). The potential and realized foraging movements of bees are differentially determined by body size and sociality. Ecology, 103(11), e3809. doi:10.1002/ecy.3809.
Examples
if (requireNamespace("pollimetrydata", quietly = TRUE) &&
utils::packageVersion("pollimetrydata") >= "1.0.1") {
x <- data.frame(ITD = c(2.9, 2.5),
sociality = c("Highly Eusocial", "Solitary"))
foraging.range(x)
}
Converts pollinator (Diptera, Hymenoptera and Lepidoptera) head width (mm) to body size (dry weight (mg)).
Description
Calculates dry body weight (mg) using head width (mm) from Hodar (1997).
Usage
headwidthsize(HW, Eq = "H97DB")
Arguments
HW |
A nonempty numeric vector of head widths in mm. All values must be finite, strictly positive and nonmissing. |
Eq |
A single character string selecting an equation from Hodar (1997). Options implemented are: H97DB (Brachycera), H97DN (Nematocera), H97HA (Hymenoptera), H97LH (Heterocera) and H97LR (Rhopalocera). |
Value
A numeric vector of predicted dry weights (mg), one per input measurement.
References
Kendall et al. (2019) Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9(4), 1702-1714. doi:10.1002/ece3.4835.
Hodar, J. A. (1997). The use of regresion equations for the estimation of prey length and biomass in diet studies of insectivore vertebrates. Miscellania Zoologica, 20(2), 1-10.
Examples
headwidthsize(HW = c(1, 2, 3), Eq = "H97HA")
Converts body length to body size (body weight (mg)) for three pollinating insect groups (Diptera, Hymenoptera and Lepidoptera).
Description
Calculates dry body weight (mg) from existing allometries using body length (mm).
Usage
lengthsize(BL, Eq = "DIP")
Arguments
BL |
A nonempty numeric vector of body lengths in mm. All values must be finite, strictly positive and nonmissing. |
Eq |
A single character string selecting one equation or a group of equations. Acronyms denote author, publication date and taxon. DIP, HYM and LEP select the implemented collections for each order. Other group selectors are Brachycera, Nematocera, Asilidae, Bombyliidae, Formicidae, Vespidae and Noctuidea. Taxon labels below identify equation applicability; only these listed group selectors and equation codes are accepted.
Options implemented are:
Hymenoptera
Lepidoptera
|
Value
A numeric vector of predicted dry weights (mg) for one equation, or a numeric matrix for a group of equations. Matrix rows follow input order and columns are named by equation.
References
Full reference list provided within Kendall et al. (2019) Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9(4), 1702-1714. doi:10.1002/ece3.4835.
Examples
lengthsize(BL = c(10, 5, 2), Eq = "S80DCR")
lengthsize(BL = c(10, 5, 2), Eq = "HYM")
Converts pollinator body length*body width to body size (dry weight (mg)).
Description
Calculates body size as dry weight (mg) from the equations described by Sample (1993) and others using body length multiplied by body width (mm squared).
Usage
lengthwidthsize(BLW, Eq = "DIP")
Arguments
BLW |
A nonempty numeric vector of body length multiplied by body width, in square millimetres (mm squared). All values must be finite, strictly positive and nonmissing. |
Eq |
A single character string selecting an equation or the LEP group. Options implemented are:
|
Value
A numeric vector of predicted dry weights (mg) for one equation, or a numeric matrix for a group of equations. Matrix rows follow input order and columns are named by equation.
References
Kendall et al. (2019) Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9(4), 1702-1714. doi:10.1002/ece3.4835.
Sample et al. (1993) Estimation of insect biomass by length and width. American Midland Naturalist, 234-240.
Examples
lengthwidthsize(BLW = c(3, 5, 2), Eq = "Brachycera")
lengthwidthsize(BLW = c(3, 5, 2))
lengthwidthsize(BLW = c(3, 5, 2), Eq = "LEP")
Converts bee body length (mm) to total field nectar load (ul).
Description
Calculates total field nectar load (ul) using body length (mm) from Henry & Rodet (2018).
Usage
nectarload(BL)
Arguments
BL |
A nonempty numeric vector of finite, positive body lengths (mm), without missing values. |
Value
A numeric vector of total field nectar load estimates in microlitres, one per input measurement.
References
Kendall et al. (2019) Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9(4), 1702-1714. doi:10.1002/ece3.4835.
Henry, M., & Rodet, G. (2018). Controlling the impact of the managed honeybee on wild bees in protected areas. Scientific reports, 8(1), 9308. doi:10.1038/s41598-018-27591-y.
Examples
nectarload(BL=c(10,5,2))
Body size measurements of pollinating insects.
Description
A dataset of 4,434 bee and hoverfly specimens, containing dry body mass (mg), intertegular distance (mm), body length (mm), taxonomy and collection metadata.
Usage
data(pollimetry_dataset)
Format
A data frame with 4,434 rows and 26 columns.
SuperfamilySuperfamily.
FamilyFamily.
SubfamilySubfamily.
TribeTribe.
GenusGenus.
SubgenusSubgenus.
SpeciesSpecies.
SexSpecimen sex.
Spec.wgtDry body mass in mg.
ITIntertegular distance in mm.
BLBody length in mm.
TagSpecimen identifier.
RegionGeographical region.
CountryCountry of collection.
LocalityCollection locality.
LocationCollection location.
LatitudeLatitude in decimal degrees.
LongitudeLongitude in decimal degrees.
MeasurementMeasurement information.
Pres.timePreservation time.
Col.dateCollection date.
PlantPlant associated with the specimen.
Col.methodCollection method.
log(Spec.wgt)Natural logarithm of dry body mass in mg.
log(IT)Natural logarithm of intertegular distance in mm.
Region:SpeciesCombined region and species grouping identifier.
Details
The model_training attribute identifies the training data for seven body size models. Stored transformed variables are populated for the corresponding training subsets.
References
Kendall et al. (2019). Pollinator size and its consequences: Robust estimates of body size in pollinating insects. doi:10.1002/ece3.4835.
Combined bee tongue-length training data.
Description
Combined training measurements from Cariveau et al. (2016) and Melin et al. (2019), covering six bee families, including Melittidae.
Usage
data(tongue_dataset)
Format
A data frame with 112 rows and eight columns.
FamilyBee family.
mean_tongue_length_mmMean total proboscis length in mm.
ITMean intertegular distance in mm.
mean_glossa_length_mmMean glossa length in mm.
mean_prementum_length_mmMean prementum length in mm.
genusBee genus.
speciesBee species.
sourceSource publication.
Details
Training data for tonguelength, comprising 101 records from Cariveau et al. (2016) and 11 species means from Melin et al. (2019). The Cariveau data were obtained from the ibartomeus/traitbase repository (raw_data/Cariveau_2016.rda).
References
Cariveau et al. (2016). The Allometry of Bee Proboscis Length and Its Uses in Ecology. doi:10.1371/journal.pone.0151482.
Melin et al. (2019). The allometry of proboscis length in Melittidae (Hymenoptera: Apoidae) and an estimate of their foraging distance using museum collections. doi:10.1371/journal.pone.0217839.
Converts ITD (mm) to tongue length for bees.
Description
Calculates tongue length (mm) from Cariveau et al. (2016) and Melin et al. (2019) using intertegular distance (ITD) values (mm).
Usage
tonguelength(x, mouthpart = "all")
Arguments
x |
A data frame with IT (finite, positive intertegular distance in mm) and Family. Supported families are: "Andrenidae", "Apidae", "Colletidae", "Halictidae", "Melittidae" and "Megachilidae". |
mouthpart |
The mouthpart you are interested in. Options are: "all", "glossa", "prementum" and "tongue" (i.e. glossa + prementum) |
Details
Models are fitted to tongue_dataset, which combines measurements from Cariveau et al. (2016) and Melin et al. (2019). Estimates are back-transformed means with 95 percent confidence intervals, expressed in millimetres. Separate models estimate glossa, prementum and total tongue length.
Value
The input data frame with predicted mouthpart lengths (mm) and 95 percent confidence bounds appended. The glossa-only result is named Glossa.
References
Kendall et al. (2019) Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9(4), 1702-1714. doi:10.1002/ece3.4835.
Cariveau et al. (2016) The Allometry of Bee Proboscis Length and Its Uses in Ecology. PLOS ONE, 11(3): e0151482. doi:10.1371/journal.pone.0151482.
Melin et al. (2019) The allometry of proboscis length in Melittidae (Hymenoptera: Apoidae) and an estimate of their foraging distance using museum collections. PLOS ONE, 14(6), e0217839. doi:10.1371/journal.pone.0217839.
Examples
example=cbind.data.frame(IT=c(1.3,2.3),
Family=c("Andrenidae","Apidae"))
tonguelength(example,mouthpart="all")
Converts intertegular distance (mm) to wing loading (mg/mm^2).
Description
Calculates wing loading (mg/mm^2) expressed as dry weight per total wing area using intertegular distance (mm) from Bullock (1999).
Usage
wingloading(IT)
Arguments
IT |
A nonempty numeric vector of finite, positive intertegular distances (mm), without missing values. |
Value
A numeric vector of wing-loading estimates (mg/mm^2), one per input measurement.
References
Kendall et al. (2019) Pollinator size and its consequences: Robust estimates of body size in pollinating insects. Ecology and Evolution, 9(4), 1702-1714. doi:10.1002/ece3.4835.
Bullock, S. H. (1999). Relationships among body size, wing size and mass in bees from a tropical dry forest in Mexico. Journal of the Kansas Entomological Society, 72(4), 426-439.
Examples
wingloading(IT=c(10,5,2))