mt_time_column | R Documentation |
track_id
and time
mt_time_column()
returns the name of the column containing the timestamps
mt_track_id_column()
returns the name of the column containing the track ids
mt_set_time_column()
set the column that should be used as time column
mt_set_track_id_column()
set the column that should be used as track id column (the column has to be present in event and track table)
mt_time_column(x)
mt_track_id_column(x)
mt_set_time_column(x, value)
mt_set_track_id_column(x, value)
x |
a |
value |
a character string of the new column name |
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()
.
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
mt_time()
to retrieve or change timestamps from each record.
mt_track_id()
to retrieve or change the track id from each record.
## 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()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.