Skip to contents

[Experimental] Checks when the specified circle was first left by a trajectory.

Usage

time_circle_left(
  x_vector,
  y_vector,
  t_vector,
  x_mid = 0,
  y_mid = 0,
  radius = 1,
  include_radius = TRUE,
  warn = TRUE
)

Arguments

x_vector

x-coordinates of the executed path.

y_vector

y-coordinates of the executed path.

t_vector

Timestamps of the executed trajectory.

x_mid

x-coordinate of the center of the circle.

y_mid

y-coordinate of the center of the circle.

radius

radius of the center of the circle.

include_radius

Whether points lying exactly on the radius should be included in the circle. Defaults to TRUE.

warn

whether a warning should be thrown if the first entry of t_vector is returned. Defaults to TRUE.

Value

Value of t_vector at the first time at which the trajectory is out of the circle.

References

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. doi:10.3758/s13428-020-01409-0

Examples

time_circle_left(0:10, rep(0, 11), 0:10)
#> [1] 2
time_circle_left(0:10, rep(0, 11), 0:10, include_radius = FALSE)
#> [1] 1