mt_track_data {move2}R Documentation

Setting and retrieving the track data in move2 objects

Description

Usage

mt_track_data(x)

mt_set_track_data(x, data)

Arguments

x

the move2 object

data

the new track data. This data.frame must contain the column with the track ids, the column name must be the same as in the move2 object.

Value

mt_track_data returns a data.frame containing the track attribute data.
mt_set_track_data returns the move2 object with updated track data

Examples

mt_sim_brownian_motion() |>
  mutate_track_data(sex = c("f", "m")) |>
  mt_track_data()
x <- mt_sim_brownian_motion(1:2, tracks = letters[1:4])
mt_set_track_data(x, data.frame(track = letters[1:4], age = 2:5))

[Package move2 version 0.2.7 Index]