get_distance {fxTWAPLS} | R Documentation |
Get the distance between points
Description
Get the distance between points, the output will be used in
get_pseudo
.
Usage
get_distance(point, cpus = 4, test_mode = FALSE, test_it = 5)
Arguments
point |
Each row represents a sampling site, the first column is longitude and the second column is latitude, both in decimal format. |
cpus |
Number of CPUs for simultaneous iterations to execute, check
|
test_mode |
Boolean flag to execute the function with a limited number
of iterations, |
test_it |
Number of iterations to use in the test mode. |
Value
Distance matrix, the value at the i-th
row, means the distance
between the i-th
sampling site and the whole sampling sites.
See Also
Examples
## Not run:
# Load modern pollen data
modern_pollen <- read.csv("/path/to/modern_pollen.csv")
point <- modern_pollen[, c("Long", "Lat")]
test_mode <- TRUE # It should be set to FALSE before running
dist <- fxTWAPLS::get_distance(
point,
cpus = 2, # Remove the following line
test_mode = test_mode
)
# Run with progress bar
`%>%` <- magrittr::`%>%`
dist <- fxTWAPLS::get_distance(
point,
cpus = 2, # Remove the following line
test_mode = test_mode
) %>%
fxTWAPLS::pb()
## End(Not run)
[Package fxTWAPLS version 0.1.3 Index]