zip_to_state_border: Distance between ZCTA centroids and nearest state border.

Description Usage Arguments Examples

View source: R/distances.R

Description

zip_to_state_border outputs the minimum distance between a ZCTA centroid and the nearest state border. Alternatively, returns the identifier for the nearest state border.

Usage

1
2
zip_to_state_border(zip_code, return_state_border_id = FALSE,
  miles = TRUE)

Arguments

zip_code

Five-digit ZIP code of ZCTA

return_state_border_id

Binary flag for whether to return the state border identifier for the nearest state border instead of the distance. Defaults to FALSE.

miles

Binary flag for whether to return distance in miles (TRUE) or kilometers (FALSE).

Examples

1
2
zip_to_state_border(fips_one = "89128", return_state_border_id = FALSE, miles = TRUE)
zip_to_state_border(fips_one = temp_df$zip_code, return_state_border_id = TRUE)

davidsovich/usgeogr documentation built on Nov. 4, 2019, 9:45 a.m.