Use before-and-after comparisons to test for range shifts. Takes the top n unique points from specified variable (elevation, latitude, etc.) and does an unpaired Mann-Whitney test. Returns absolute difference in means (not scaled to time period) and the p-value from the MW test.
1 | mw.2period(dataset, resp = "elev", pre.years, post.years, n.mw = 10)
|
dataset |
A dataset frame containing columns "Year" and "Species" at a minimum as well as the response variable. |
resp |
A variable within the dataset that is being tracked, such as elevation, or latitude. (If latitude is used, just note to convert it back to km manually, it's not currently automatic in here.) |
pre.years |
An interval entered as "c(year1,year2)" |
post.years |
An interval entered as "c(year1,year2)" |
n.mw |
The number of unique points to be used in the Mann-Whitney comparison. It defauls to 10. Remember that if you use negative you can do southern or lower elevations easy |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.