mt_time_column {move2}R Documentation

Get or set the name of the column containing the track_id and time

Description

Usage

mt_time_column(x)

mt_track_id_column(x)

mt_set_time_column(x, value)

mt_set_track_id_column(x, value)

Arguments

x

a move2 object

value

a character string of the new column name

Details

The set functions purely update the attribute containing the column name after checking the minimal requirements.

For mt_set_track_id_column() the column has to be present in event and track table, if this is not the case consider using mt_track_id().

Value

mt_time_column and mt_track_id_column return character string of the column name
mt_set_time_column and mt_set_track_id_column return an updated move2 object

See Also

mt_time() to retrieve or change timestamps from each record.
mt_track_id() to retrieve or change the track id from each record.

Examples

## getting the column names
mt_sim_brownian_motion() |> mt_time_column()
mt_sim_brownian_motion() |> mt_track_id_column()

## setting 'time' to a new column
x <- mt_sim_brownian_motion()
x$date <- as.Date("2020-1-1") + x$time * 3
x |> mt_time_lags()
x |>
  mt_set_time_column("date") |>
  mt_time_lags()

[Package move2 version 0.3.0 Index]