View source: R/cluster_events.R
calc_dist_to_centre | R Documentation |
Calculate euclidean distance between two points.
calc_dist_to_centre(.x, .c)
.x |
A numerical vector with coordinates to a point. |
.c |
A numerical vector with the coordinates to the center. |
A numerical vector with the euclidean distance between the two points.
This function does mot make use of the base function dist, as that dist-function is about twice as slow as the implementation here.
beadplexr:::calc_dist_to_centre(.x = c(10, 15), .c = c(1, 2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.