View source: R/mt_track_lines.R
mt_track_lines | R Documentation |
Converts each track into one line
mt_track_lines(x, ...)
x |
A move object |
... |
Arguments passed on to the summarise function |
Note that all empty points are removed before summarizing. Arguments passed with ...
thus only summarize for the
non empty locations.
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
mt_segments()
For transforming all segments to a LINESTRING
separately
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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.