make_bbox: Compute a bounding box

Description Usage Arguments Examples

View source: R/make_bbox.R

Description

Compute a bounding box for a given longitude / latitude collection.

Usage

1
make_bbox(lon, lat, data, f = 0.05)

Arguments

lon

longitude

lat

latitude

data

(optional) a data frame containing lon and lat as variables

f

number specifying the fraction by which the range should be extended

Examples

1
2
3
4
5
6
make_bbox(lon, lat, data = crime)

(lon <- sample(crime$lon, 10))
(lat <- sample(crime$lat, 10))
make_bbox(lon, lat)
make_bbox(lon, lat, f = .10) # bigger box

fresques/ggmap documentation built on May 28, 2019, 8:40 p.m.