View source: R/extendr-wrappers.R
haversine_intermediate | R Documentation |
Identifies the location between two points on a great circle along a specified fraction of the distance.
haversine_intermediate(x, y, distance)
x |
an |
y |
an |
distance |
a numeric vector of either length 1 or the same length as x and y |
an object of class rs_POINT
x <- geom_point(1:10, rep(5, 10))
y <- geom_point(1:10, rep(0, 10))
res <- haversine_intermediate(x, y, 0.5)
if (rlang::is_installed(c("wk", "sf"))) {
plot(
c(x, y, res),
col = sort(rep.int(c("red", "blue", "purple"), 10)),
pch = 16
)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.