mt_deviations(data, use = "trajectories", save_as = use, dimensions = c("xpos", "ypos"), start_ideal = NULL, end_ideal = NULL, prefix = "", verbose = FALSE, show_progress = NULL)
mt_calculate_deviations(data, use = "trajectories", save_as = use, dimensions = c("xpos", "ypos"), start_ideal = NULL, end_ideal = NULL, prefix = "", verbose = FALSE, show_progress = NULL)use will be ignored).c("xpos","ypos")), the x- and y-positions are used.verbose instead.xpos_ideal and
ypos_ideal) and the perpendicular deviations of the actual
trajectory from the idealized trajectory (by default called
dev_ideal) have been added as additional columns to the trajectory
array. If the trajectory array was provided directly as data, only
the trajectory array will be returned.
mt_deviations: Calculate deviations from idealized trajectory mt_calculate_deviations: Deprecated
If a deviation occurs above the direct path, this is denoted by a positive
value. If it occurs below the direct path, this is denoted by a negative
value. This assumes that the complete movement in the trial was from bottom
to top (i.e., the end point has a higher y-position than the start poins). In
case the movement was from top to bottom, mt_deviations
automatically flips the signs. Note that the second dimension specified in
dimensions is used for determining all this.
# Calculate deviations from idealized trajectory
# (straight line connecting the start and end point of each trial)
mt_example <- mt_deviations(mt_example)
# Calculate deviations from idealized trajectory with
# constant start and end points across trials
mt_example <- mt_deviations(mt_example,
start_ideal=c(xpos=0,ypos=0), end_ideal=c(xpos=-665,ypos=974))
Run the code above in your browser using DataLab