mop | R Documentation |
This function takes two data frames or matrices that represent the environment of sites measured in univariate or multivariate space and returns the x-th percentile of sites in each set that are closest to each other in Euclidean space. Note that in many cases it is advisable to first transform the raw environmental values using, for example, PCA. MOP was first presented formally in Owens, H.L., Campbell, L.P., Dornak, L.L., Saupe, E.E., Barve, N., SoberĂ³n, Ingenloff, K., Lira-Noriega, A., Hensz, C., Myers, C.E., and Peterson, A.T. 2013. Constraints on interpretation of ecological niche models by limited environmental ranges on calibration area. Ecological Modeling 263:10-18.
mop(set1, set2, p, index = FALSE, cores = 1, na.rm = FALSE)
set1 |
Data frame or matrix one or more columns wide. |
set2 |
Data frame or matrix one or more columns wide. |
p |
Numeric value(s) in the range [0, 1]. The p-th percentile of sites in |
index |
Logical, if |
cores |
Integer >= 0, number of cores to use (can speed large computations). |
na.rm |
Logical, if |
List with three elements. The first two elements correspond to set1
and set2
. Each of these elements is a list the same length of p
, with each data frame/matrix corresponding to a value of p
. The third element is a matrix of statistics reporting the statistics pertaining to the environmental distances between each subset of set1
and set2
.
mess
set1 <- data.frame(x1=1:20, x2=round(100 * rnorm(20))) set2 <- data.frame(x1=sample(1:30, 30), x2=sort(round(100 * rnorm(30)))) # return data frames that are subsets of set1 and set2 out <- mop(set1, set2, p=c(0.1, 0.5)) out # return indices of subsets of set1 and set2 out <- mop(set1, set2, p=c(0.1, 0.5), index=TRUE) out
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.