View source: R/ParallelProcessing_functions.R
BoundaryFinderPar | R Documentation |
This function takes the distances among all reference specimens and uses a process similar to
leave-one-out correct cross-validation to identify likely spatial trait boundaries. This method
only allows for the inclusion of specimens with specific known locations (i.e. specific
latitude-longitude coordinates). This functions requires a distance input, which allows the user
to input any desired dissimilarity or distance metrics as appropriate for the data. This function
is a version of the Boundaryfinder
function that makes use of the foreach
package
BoundaryFinderPar( LatLongs, RefDistMat = matrix(), LongRange, LatRange, RangeSamp = 10, ExpandMap = c(0, 0), StartPoint = 1, RefIDs = NULL, IgnorePrompts = FALSE, Method = c("Spearman", "Pearson"), PacificCent = FALSE )
LatLongs |
a matrix of n rows by 2 columns where n is the number of reference specimens in your dataset and the columns are Latitude and Longitude values in that order. These latitude-longitude coordinates should be of the locations of the reference specimens. |
RefDistMat |
is a square matrix of pairwise distances among all reference specimens |
LongRange |
is a vector of 2 elements defining the maximum and minimum Longitude values that the provenancing method should explore. This will also define the mapping range in the final plotted output. |
LatRange |
is a vector of 2 elements defining the maximum and minimum Latitude values that the provenancing method should explore. This will also define the mapping range in the final plotted output. |
RangeSamp |
is an integer vector of 1 or 2 elements that defines the resolution of spatial sampling. If one element is provided then both the latitude and longitude ranges are equally and evenly sampled using this value. If 2 elements are provided they should be in the order of latitude longitude and each range will be evenly sampled with its respective value. |
ExpandMap |
is a vector of 2 elements for expanding the plotting region of the map. The first element expands the latitudinal area and the second element expands the longitudinal area. |
StartPoint |
is an iteger that denotes the specimen to start the process on. As the method needs to cycle through all known specimens in the database, this can take some time. If the process is stopped for whatever reason the process can be picked up again by adjusting the StartPoint to the specimen number that it had previously finished on. |
RefIDs |
is a vector of the unique identifiers for each of the reference specimens in the reference dataset. These values will be used for naming the files in the datadump fololder and also for matching up with the returned summary results. Default is set to NULL and if this is not populated then reference data is worked through consecutively, naming the datadump files in consecutive order. |
IgnorePrompts |
default is set to FALSE, but if set to TRUE queries such as those confirming the location of the datadump will be surpressed. |
Method |
determines what kind of correlation coefficient should be used, either "Spearman" or "Pearson". Spearman's ranked correlation coefficient does not assume a linear relationship between geographic and trait distances, whereas Pearson's coefficient does. |
PacificCent |
logical determines whether the plotted map and analyses should be centred on the Pacific. Default set to FALSE. |
The resulting array can be transferred to the PlotBoundaries
function for plotting.
An dataframe of all values for every sampled grid reference for every specimen is returned.
Ardern Hulme-Beaman
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.