The goal of distance is to calculate distances with Euclidean and Taxicab geometry.
You can install the development version from GitHub with:
# install.packages("devtools")
devtools::install_github("rbolt13/distance")
It might be useful to know the Taxicab distance and the Euclidean distance between two points.
library(distance)
x1 <- 2
x2 <- 8
y1 <- 5
y2 <- 1
distance_E(x1,x2,y1,y2)
#> [1] 7.211103
distance_T(x1,x2,y1,y2)
#> [1] 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.