View source: R/index_max_acceleration.R
index_max_acceleration | R Documentation |
Computes the index of the peak acceleration of a trajectory, defined by vectors of x and y coordinates, and assumed to be equidistant in time.
index_max_acceleration(x_vector, y_vector, absolute = FALSE)
x_vector |
x-coordinates of the executed path. |
y_vector |
y-coordinates of the executed path. |
absolute |
Should negative accelerations (i.e., deceleration)
be included? Defaults to |
The supplied vectors are assumed to be ordered by time with equal time differences.
Single number indicating the index of peak acceleration (1 to +Inf).
Wirth, R., Foerster, A., Kunde, W., & Pfister, R. (2020). Design choices: Empirical recommendations for designing two-dimensional finger tracking experiments. Behavior Research Methods, 52, 2394 - 2416. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.3758/s13428-020-01409-0")}
x_vals <- c(0, 1, 2, 3, 6, 10, 12, 14, 15)
y_vals <- c(0, 0, 0, 0, 0, 0, 0, 0, 0)
index_max_acceleration(x_vals, y_vals)
# acceleration maximal between x_vals[4] and x_vals[5]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.