mt_track_lines {move2}R Documentation

Convert trajectories into lines

Description

Converts each track into one line

Usage

mt_track_lines(x, ...)

Arguments

x

A move object

...

Arguments passed on to the summarise function

Details

Note that all empty points are removed before summarizing. Arguments passed with ... thus only summarize for the non empty locations.

Value

A sf::sf object with a LINESTRING representing the track as geometry for each track. The track_data for each track is included as well as the products from summarize

See Also

Examples

mt_sim_brownian_motion() |>
  mt_track_lines(
    n = dplyr::n(),
    minTime = min(time),
    maxTime = max(time)
  )
## empty points are not counted in summary statistic
x <- mt_sim_brownian_motion(1:3)
x$geometry[[2]] <- sf::st_point()
x |> mt_track_lines(
  n = dplyr::n()
)
## plot of the tracks as a line
mt_sim_brownian_motion(
  tracks = letters[1:2],
  start_location = list(c(0, 0), c(10, 0))
) |>
  mt_track_lines() |>
  plot()


[Package move2 version 0.3.0 Index]