Description Usage Arguments Details Value References Examples

This function was used by Wang et. al.(2012) to test geometric constraints, on elevational gradients. The function randomizes the range extents and range location for each species and returns expected pattern in species richness under geometric constraints.

1 2 | ```
range_shuffle(x, boundary, var, interval, sites, reps, degen, lowest = NA,
highest = NA)
``` |

`x` |
Input data for elevational extents of species.data.dataframe with names 'genus_species','min','max','range','mid', 'num_zones'. See Wang et.al (2012) for details. Species names column is optional. |

`boundary` |
nature of boundaries at the extremes of the gradien ie. either 'hard boundaries' that species cannot cross, or 'soft boundaries' that species can move across. Can be one of the following choises "hh", "sh", "hs", or "ss" |

`var` |
Predictor variable for constraining randomizations. dataframe with columns 'mid' and 'weights'. Where 'wights' provide relative chance of selecting a range location, typically based on environmental predictors |

`interval` |
Numeric. Interval between |

`sites` |
Numeric. Locations on domain for calculating species richness |

`reps` |
number of iterations |

`degen` |
logical. If TRUE save each randomized distribution. |

`lowest` |
Numeric. If analysis is only for a subset of the sampled gradient then the minimum point within the subset |

`highest` |
Numeric. If analysis is only for a subset of the sampled gradient then the maximum point within the subset |

range_shuffle impliments simulations described by Wang et.al (2012) to estimate effect of geometric and environmental constraints on pattern in species richness across spatial graidients. It calculates a vector of all possible range locations for each given range extent based on the conditions for geometric constraints given by 'boundary'. Range locations are randomized by sampling from this vector.

If degen is FALSE, a data frame with four colums for mean, SD and confidence intervals of expected richness

"mod.rich" mean richness of each site

"mod.sd" standard deviation of species richness

"q2.5" lower limit of the confidence interval

"q97.5" upper limit of the confidence interval

If degen is TRUE, then a list containing above data frame and a list of all the randomized matrices

Wang, X., and J. Fang. 2012. Constraining null models with environmental gradients: a new method for evaluating the effects of environmental factors and geometric constraints on geographic diversity patterns. Ecography 35:1147-1159.

1 2 3 4 5 6 7 |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.