interp2 | R Documentation |
Convenient wrapper to signal::interp1()
for linear
interpolation. Assumes that you want interpolated values of
xy_old
at n_xy_new
equidistant data points.
interp2(time_old, xy_old, n_xy_new = 101)
time_old |
Timestamps of the |
xy_old |
To-be normalized x or y coordinates. |
n_xy_new |
Number of equidistant timepoints that should be generated. Defaults to 101. |
Vector of length n_xy_new
with interpolated x or y values.
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")}
plot(interp2(0:10, (0:10)^2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.