getReachAngleAt: Angular deviation of a reach from target at a specific point.

View source: R/reaches.R

getReachAngleAtR Documentation

Angular deviation of a reach from target at a specific point.

Description

?

Usage

getReachAngleAt(
  trialdf,
  location = "pr0.33333",
  posunit = "pix",
  timeunit = "ms",
  device = "hand",
  holdvelocity = NA,
  holdduration = NA
)

Arguments

trialdf

Data frame representing the reach.

location

String specifying which location to use (see details).

posunit

String with the unit of x,y coordinates (pix, cm, ...)

timeunit

String with the unit of time (s, ms, ...)

device

String saying what position to use (hand, mouse, robot...)

holdvelocity

Maximum velocity for a hold.

holdduration

Minimum duration for a hold.

Details

The 'location' argument specifies which point along the trajectory to use for a reach deviation (in degrees). It canhgave several (string) values:

- 'maxvel', requires a column 'maxvel' in the data frame with a single value of 1 (and 0 otherwise). The coordinates at this sample are used. - 'endpoint', uses the last sample of the trajectory, useful for no-cursor trials with the return trajectory removed - 'prX', uses the first sample at or beyond a proportion of distance from the target, given by X (a float), the default setting: 'pr0.33333'

There are other options, but they are not consolidated yet.

Value

Matrix with 1 row, 5 columns: 1: angular deviation 2: target angle 3: x position of location 4: y position of location 5: time of location The idea is to combine this into a larger matrix (or data frame) with multiple others, and then do further processing on that.

Examples

#

thartbm/handlocs documentation built on Feb. 18, 2025, 10:53 p.m.