# R/gcd.slc.R In ejanalysis/proxistat: Create a Proximity Score in Each Census Unit, Based on Distances to Specified Points

#### Documented in gcd.slc

```#' @title Distance based on spherical law of cosines
#' @description Calculates the geodesic distance between two points
#'   (or multiple pairs of points) specified by radian latitude/longitude.
#' @details long1 and lat1 must be same length. long2 and lat1 must be same length.
#'   All four must be the same length, defining pairs of points.
#'   Alternatively long1 and lat1 can define a single point while long2 and lat2 define a series of points, or vice versa.
#'   Taken from \url{http://www.r-bloggers.com/great-circle-distance-calculations-in-r/}
#'   but use \code{\link{pmin}} instead of \code{\link{min}} to vectorize it to handle at least pairs.
#' @param long1 longitude(s) in radians, vector of one or more numbers
#' @param lat1 latitude(s) in radians, vector of one or more numbers
#' @param long2 longitude(s) in radians, vector of one or more numbers
#' @param lat2 latitude(s) in radians, vector of one or more numbers
#' @return Distance in kilometers