Learn R Programming

mateable (version 0.3.1)

synchrony: Make potentials object--mating synchrony

Description

Calculate one of a variety of measures of mating synchrony.

Usage

synchrony(scene, method, subject = "all", averageType = "mean",
  syncNN = 1, compareToSelf = FALSE, frame = "within")

Arguments

scene
a matingScene object that includes the flowering schedule for the scene of interest.
method
character, partial matching allowed, describing what type of synchrony will be calculated. "augspurger" is based on the method described in Augspurger (1983). "kempenaers" is based on the method described in Kempenaers (1993). "sync_prop" will calculat
subject
one of "population", "pairwise", "individual", or "all" - see Value for more details.
averageType
character. Identifies whether to take the mean or median when calculating averages
syncNN
integer between 1 and n-1 (inclusive) or numeric between 0 and 1 (exclusive). The kth nearest neighbor to be averaged when calculating population synchrony. If k is in (0,1) then the k*nth nearest neighbor will be found
compareToSelf
logical. Whether or not to include self comparisons when calculation synchrony. Defaults to FALSE.
frame
the timeframe that synchrony is to be calculated over; options are 'within,' for synchrony within a season, or 'between,' for synchrony across multiple seasons. Defaults to 'within'.

Value

  • A potentials object containing one more more of the following, depending the input for subject: If subject is "population" synchrony will return a numeric value that has a range depending on the method. If subject is "pairwise" synchrony will return a matrix with all pairwise synchrony comparisons. It is important to note two things: [1] if method is set to "sync_nn" then the pairwise comparisons will be in descending order and cannot be indexed by ID order. [2] if compareToSelf is set to FALSE, the matrix will have dimensions 100 rows by 99 columns. Similar to overlap, indexing will be affected. If subject is "individual" synchrony will returns a data frame with a row for id and a row for individual synchrony. If subject is "all" synchrony will return a list containing the values described above for population, pairwise, and individual synchrony.

Details

Measures of synchrony are based on methods described in Augspurger (1983), Kempenaers (1983), and from Ison et al. (2014), as well as variations on different factors of those measures.

References

Augspurger, C.K. (1983) Phenology, flowering synchrony, and fruit set of six neotropical shrubs. Biotropica 15, 257-267. Ison, J.L., S. Wagenius, D. Reitz., M.V. Ashley. (2014) Mating between Echinacea angustifolia (Asteraceae) individuals increases with their flowering synchrony and spatial proximity. American Journal of Botany 101, 180-189 Kempenaers, B. (1993) The use of a breeding synchrony index. Ornis Scandinavica, 24, 1.

Examples

Run this code
pop <- simulateScene(size = 150)
synchrony(pop, "augs")

pop2 <- simulateScene(size = 1234, sdDur = 5, sk = 1)
syncVals <- synchrony(pop2, "sync_nn", "all", "median", 123)

Run the code above in your browser using DataLab