mutate_tr: Conveniently add common new variables to the 'tr' table.

Description Usage Arguments See Also

Description

These functions are designed for use within summarise_, and will compute common derived parameters for tracks. By default, these functions will use the expected variable names, as are default in tracks objects, but they can be overridden.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
change(var, order_by = frame, frame_rate = tracks$params$frame_rate,
  n = 1)

speed(x = X, y = Y, order_by = frame,
  frame_rate = tracks$params$frame_rate)

acceleration(x = X, y = Y, order_by = frame,
  frame_rate = tracks$params$frame_rate)

heading(x = X, y = Y, order_by = frame)

angular_velocity(x = X, y = Y, order_by = frame,
  frame_rate = tracks$params$frame_rate)

Arguments

var

A variable for which to calculate the first order differential.

order_by

This parameter controls the ordering of dplyr::lag and dplyr::lead and it is strongly advised to leave it at it's default (frame).

frame_rate

All variables with a time dimension, will be calculated based on seconds (not frames). By default this is read from the tracks object.

n

Offset for change. See lag.

x

X-coordinate.

y

Y-coordinate.

See Also

mutate_soc mutate_.tracks


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