track_*
Constructor to crate a track, the basic building block of the amt
package. A
track
is usually created from a set of x
and y
coordinates, possibly
time stamps, and any number of optional columns, such as id, sex, age, etc.
mk_track(tbl, .x, .y, .t, ..., crs = NULL, order_by_ts = TRUE,
check_duplicates = FALSE)make_track(tbl, .x, .y, .t, ..., crs = NULL, order_by_ts = TRUE,
check_duplicates = FALSE)
track(x, y, t, ..., crs = NULL)
data.frame The data.frame
from which a track should be
created.
[expression(1)]
Unquoted variable names of columns
containing the x and y coordinates, and optionally a time stamp.
[expression]
Additional columns from tbl
to be used in a
track. Columns should be provided in the form of key = val
(e.g., for ids
this may look like this id = c(1, 1, 1, 2, 2, 2
for three points for ids
1 and 2 each).
[sp::CRS]
An optional coordinate reference system of the
points.
[logical(1)]
Should relocations be ordered by time
stamp, default is TRUE
.
[logical(1)=FALSE]
Should it be checked if there are
duplicated time stamp, default is FALSE
.
[numeric]
The x and y coordinates.
[POSIXct]
The time stamp.
If t
was provided an object of class track_xyt
is returned
otherwise a track_xy
.