mt_exclude_finish {mousetrap} | R Documentation |
Exclude phase without mouse movement at end of trial.
Description
Exclude a potential phase at the end of a trial where the mouse was not moved. The corresponding samples (x- and y-positions and timestamps) in the trajectory data will be removed.
Usage
mt_exclude_finish(
data,
use = "trajectories",
save_as = use,
dimensions = c("xpos", "ypos"),
timestamps = "timestamps",
verbose = FALSE
)
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 |
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 contain the mouse positions. |
timestamps |
a character string specifying the trajectory dimension containing the timestamps. |
verbose |
logical indicating whether function should report its progress. |
Details
mt_exclude_finish
removes all samples (except the first) at the end of
the trial during which the mouse was not moved compared to its final
position. It returns only x- and y-positions as well as timestamps.
Please note that this operation may result in changes in several mouse-tracking measures, for example, the response time (RT).
Value
A mousetrap data object (see mt_example) from which a
potential phase without mouse movement at the end of the trial was removed.
If the trajectory array was provided directly as data
, only the
trajectory array will be returned.
Author(s)
Pascal J. Kieslich
Dirk U. Wulff
See Also
mt_exclude_initiation for removing a potential initial phase without mouse movement.
Examples
mt_example <- mt_exclude_finish(mt_example,
save_as="mod_trajectories")