Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

bbox

Get bounding box of a track.


Description

Get bounding box of a track.

Usage

bbox(x, ...)

## S3 method for class 'track_xy'
bbox(x, spatial = TRUE, buffer = NULL, sf = FALSE, ...)

## S3 method for class 'steps_xy'
bbox(x, spatial = TRUE, buffer = NULL, sf = FALSE, ...)

Arguments

x

[track_xy, track_xyt]
A track created with make_track.

...

Further arguments, none implemented.

spatial

[logical(1)=FALSE]
Whether or not to return a SpatialPolygons-object or not.

buffer

[numeric(0)=NULL]{NULL, >0}
An optional buffer of the bounding box.

sf

[logical(1)=FALSE]
If TRUE a simple feature polygon is returned.

Examples

data(deer)
bbox(deer)
bbox(deer, spatial = FALSE)
bbox(deer, buffer = 100, spatial = FALSE)

# For steps
deer %>% steps_by_burst %>% bbox(spatial = FALSE)
deer %>% steps_by_burst %>% bbox(buffer = 100, spatial = FALSE)
deer %>% steps_by_burst %>% random_steps %>% bbox(spatial = FALSE)

amt

Animal Movement Tools

v0.1.4
GPL-3
Authors
Johannes Signer [aut, cre], Brian Smith [ctb], Bjoern Reineking [ctb], Ulrike Schlaegel [ctb], John Fieberg [ctb], Scott LaPoint [dtc]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.