Learn R Programming

cholera (version 0.4.0)

segmentLocator: Locate road segment by ID.

Description

Highlights the selected road segment and its cases.

Usage

segmentLocator(id, zoom = FALSE, radius = 0.5, cases = "anchors",
  unit = NULL, title = TRUE, subtitle = TRUE)

Arguments

id

Character. A concatenation of a street's numeric ID, a whole number between 1 and 528, and a second number to identify the segment.

zoom

Logical. Default is FALSE.

radius

Numeric. Controls the degree of zoom. For values <= 5, the numeric ID of all cases or just the anchor case is plotted.

cases

Character. Plot cases: NULL, "anchors" or "all".

unit

Character. Unit of measurement: "meter" or "yard". Default is NULL, which returns the map's native scale.

title

Logical. Print title.

subtitle

Logical. Print subtitle.

Value

A base R graphics plot.

Notes

With Dodson and Tobler's data, a street (e.g., Broad Street) is often comprised of multiple straight line segments. To identify each segment individually, an additional number is appended to form a text string ID (e.g., "116-2"). See cholera::road.segments.

See Also

road.segments

Examples

Run this code
# NOT RUN {
segmentLocator("190-1")
segmentLocator("216-1")
segmentLocator("216-1", unit = "meter")
# }

Run the code above in your browser using DataLab