Description Usage Arguments Value Examples
In the york building and york crime context, writing
nearest(york_crime,york)
reads as "find the nearest crime in york to
each building in york, and returns a dataframe with every building in
york, the nearest york_crime to each building, and the distance in
metres between the two."
1 |
nearest_df |
dataframe containing latitude and longitude |
to_df |
dataframe containing latitude and longitude |
distance_cutoff |
integer the distance threshold you are interested in assessing coverage at |
... |
extra arguments to pass to nearest |
a dataframe containing information about the distance threshold uses (distance_within), the number of events covered and not covered (n_cov, n_not_cov), the percentage covered and not covered (pct_cov, pct_not_cov), and the average distance and sd distance.
1 2 3 4 5 6 7 8 9 | library(dplyr)
# already existing locations
york_selected <- york %>% filter(grade == "I")
# proposed locations
york_unselected <- york %>% filter(grade != "I")
coverage(york_selected, york_crime)
coverage(york_crime, york_selected)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.