filter_track_data {move2} | R Documentation |
dplyr
functions to manipulate the track data
Description
-
filter_track_data
filter data based on a track attribute (e.g. select all juveniles). Based onfilter
. -
select_track_data
keep or drop attributes in the track data. Based onselect
. -
mutate_track_data
create or modify attributes in the track data. Based onmutate
. -
group_by_track_data
group by one or more attribute of the track data (e.g. group by sex, by taxon, by life stage, etc). Based ongroup_by
.
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 |
... |
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 |
.drop |
see original function docs |
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.3.0 Index]