Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


trackdf (version 0.3.3)

conversions: Convert a Track Table to/from Other Formats

Description

The following methods will convert track tables to and from other common formats used for processing tracking and spatial data.

Usage

as_track(x, table = "df", ...)

# S3 method for MoveStack as_track(x, table = "df", ...)

# S3 method for Move as_track(x, table = "df", ...)

as_move(x, ...)

# S3 method for SpatialPointsDataFrame as_track(x, table = "df", ...)

as_sp(x, ...)

# S3 method for track as_sp(x, ...)

# S3 method for ltraj as_track(x, table = "df", ...)

as_ltraj(x, ...)

# S3 method for track as_ltraj(x, ...)

# S3 method for telemetry as_track(x, table = "df", ...)

# S3 method for list as_track(x, table = "df", ...)

as_telemetry(x, ...)

# S3 method for track as_telemetry(x, ...)

# S3 method for moveData as_track(x, table = "df", type = c("LL", "UTM"), ...)

as_moveHMM(x, ...)

# S3 method for track as_moveHMM(x, ...)

Value

The coordinates converted in the chosen format.

Arguments

x

An object to convert.

table

A string indicating the class of the table on which the track table should be built. It can be a data.frame ("df", the default), a tibble ("tbl"), or a data.table ("dt").

...

Other parameters to be passed to:

  • track_df, track_tbl or track_dt if as_track is used.

  • sp::SpatialPointsDataFrame if as_sp is used.

  • adehabitatLT::as.ltraj if as_ltraj is used.

  • ctmm::as.telemetry if as_telemetry is used.

  • moveHMM::prepData if as_moveHMM is used.

type

For converting moveHMM::moveData to track table only, a character string indicating the type of coordinates stored in the moveHMM::moveData object: "LL" if longitude/latitude (default), "UTM" if easting/northing.

Author

Simon Garnier, garnier@njit.edu

See Also

track_df, track_tbl, track_dt

Examples

Run this code
if (FALSE) {
data(short_tracks)

if (requireNamespace("sp", quietly = TRUE)) {
  sp <- as_sp(short_tracks)
  as_track(sp)
}

if (requireNamespace("adehabitatLT", quietly = TRUE)) {
  lt <- as_ltraj(short_tracks)
  as_track(lt)
}

if (requireNamespace("ctmm", quietly = TRUE)) {
  tl <- as_telemetry(short_tracks)
  as_track(tl)
}

if (requireNamespace("moveHMM", quietly = TRUE)) {
  hhm <- as_moveHMM(short_tracks, type = "LL")
  as_track(hhm)
}
}

Run the code above in your browser using DataLab