expand_tracks: Add missing components to a tracks object.

Description Usage Arguments Details Value See Also

View source: R/tracks_object.R

Description

This function will add the group, pairs and trial components to a track object, if they are currently not included. Note that the pairs component will be increase the size by a lot, if there is more than a few animals per trial.

Usage

1
2
expand_tracks(tracks, soc = TRUE, group = TRUE, trial = TRUE,
  animal = TRUE, pair = TRUE)

Arguments

tracks

A tracks object.

soc

If TRUE, soc will be checked for and added if missing.

group

If TRUE, group will be checked for and added if missing.

trial

If TRUE, trial will be checked for and added if missing.

animal

If TRUE, animal will be checked for and added if missing.

pair

If TRUE, pair will be checked for and added if missing.

Details

Note that this function is similar to running as_tracks(tracks$tr, ...) , but safer (i.e. no loss of data).

If group, pairs and trial are all false, it will return tracks.

Value

A tracks object.

See Also

as_tracks


Ax3man/trackr documentation built on Oct. 8, 2019, 10:53 p.m.