#' Test whether point "b" is within a given radius of point "a".
#'
#' @param a Numeric. Data frame of x-y coordinates.
#' @param b Numeric. Data frame of x-y coordinates.
#' @param radius Numeric.
#' @noRd
withinRadius <- function(a, b, radius = 2) {
(a[, 1] - b[, 1])^2 + (a[, 2] - b[, 2])^2 <= radius^2
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.