as_tracks: The 'tracks' object

Description Usage Arguments Value Functions Object structure See Also

View source: R/tracks_object.R

Description

The tracks object

Usage

1
2
3
4
as_tracks(tr, frame_rate, resolution, meta_data = NULL, px_per_cm = 1,
  minimal = TRUE)

is.tracks(x)

Arguments

tr

Data.frame with tracking data (from read in functions).

frame_rate

Frames per second.

resolution

Provide standard name for resolution (e.g. "720") or actual resolution in pixels (e.g. "1920x1080"). Stored for later use, also used as default tracking window (boundary).

meta_data

Optionally supply a data.frame with meta data about the trials, such as treatments. Can include a column named trial that needs to match the trial names listed in the trial table. Otherwise this column is created, with identical ordering as the trial table assumed.

px_per_cm

Length scaling factor. When left at 1, all measurements will be per pixel.

minimal

When TRUE, the minimum amount of components (see list below) are including in the object. When FALSE, the group, pairs and trial components will already be generated.

x

An object.

Value

A tracks object.

Functions

Object structure

The tracks object is a list with the following tables:

tr

party_df organized by trial, animal, frame. Useful for storing individual variables such as location, speed, orientation, distance to object etc.

soc

party_df organized by trial, pair of animals, frame. Useful for storing social variables, such as distance, relative orientation etc.

group

tbl_df organized by trial, frame. Useful for storing group level variables, such as polarization, centrality, group size, mean neighbour distance etc.

location

tbl_df organized by trial, xbin, ybin. Useful for aggregate data for spatial heatmaps etc.

meta_data

tbl_df organized by trial. Contains information about the trial, such as group origin, treatment, time of testing etc.

animal

tbl_df organized by trial and animal, containing animal level measurements (nested in trial), such as average speed.

pair

tbl_df organized by trial and pair, containing pair level measurements (nested in trial), such as average distance.

trial

tbl_df organized by trial, containing trial level measurements, such as average speed.

params

A list with general experiment parameters, such as frame_rate, scale, resolution etc.

tracks, meta_data, and params are always present, others may not be. This is to preserve memory space when they are not needed. Order is not garantueed, refer by name if you need to access them.

Methods for common generics may be available.

See Also

read_idTracker, read_Ctrax


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