Learn R Programming

mousetrap (version 2.0.0)

mt_align_start: Align start position of trajectories.

Description

Adjust trajectories so that all trajectories have the same start position.

Usage

mt_align_start(data, use = "trajectories", save_as = "trajectories", dimensions = c("xpos", "ypos"), start = c(0, 0), verbose = FALSE, xpos_start = NULL, ypos_start = NULL, show_progress = NULL)

Arguments

data
a mousetrap data object created using one of the mt_import functions (see mt_example for details). Alternatively, a trajectory array can be provided directly (in this case use will be ignored).
use
a character string specifying which trajectory data should be used.
save_as
a character string specifying where the resulting trajectory data should be stored.
dimensions
a character vector specifying the dimensions in the trajectory array that should be space-normalized.
start
a numeric vector specifying the start values for each dimension, i.e., the values the first recorded position should have in every trial.
verbose
logical indicating whether function should report its progress.
xpos_start
Deprecated. Please use start instead.
ypos_start
Deprecated. Please use start instead.
show_progress
Deprecated. Please use verbose instead.

Value

A mousetrap data object (see mt_example) with aligned trajectories. If the trajectory array was provided directly as data, only the trajectory array will be returned.

See Also

mt_space_normalize for space normalizing trajectories.

mt_remap_symmetric for remapping trajectories.

Examples

Run this code
mt_example <- mt_align_start(mt_example,
  start=c(0,0))

Run the code above in your browser using DataLab