filter_track_data {move2}R Documentation

dplyr functions to manipulate the track data

Description

Usage

filter_track_data(.data, ..., .track_id = NULL)

select_track_data(.data, ...)

mutate_track_data(.data, ...)

group_by_track_data(
  .data,
  ...,
  .add = FALSE,
  .drop = dplyr::group_by_drop_default(.data)
)

Arguments

.data

the move2 object

...

The identifiers of one or more tracks to select or selection criteria based on track attributes

.track_id

A vector of the ids of the tracks to select

.add

see original function docs group_by

.drop

see original function docs group_by

Value

a move2 object

Examples

## simulating a move2 object with 4 tracks
data <- mt_sim_brownian_motion(tracks = letters[1:4])

## retaining tracks "b" and "d"
data |>
  filter_track_data(.track_id = c("b", "d"))

## adding the attribute "sex" to the track data
data <- data |>
  mutate_track_data(sex = c("m", "f", "f", "m"))

## retaining tracks of females
data |> filter_track_data(sex == "f")


[Package move2 version 0.2.7 Index]