R/RcppExports.R

Defines functions compute_velocity_ek

Documented in compute_velocity_ek

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' Compute velocity via Engbert & Kliegl (2003) algorithm.
#'
#' @description Compute velocity via Engbert & Kliegl (2003) algorithm.
#' See formula #1 in the manuscript.
#'
#' @param x Vector of coordinates
#' @param trial Vector with trial labels, so that velocity is computed only within trials.
#' @param time_window_in_samples Width of window for velocity computation in samples.
#' @param delta_t Duration of a single frame (1 / sampling rate).
#'
#' @return Velocity vector
#' @export
compute_velocity_ek <- function(x, trial, time_window_in_samples, delta_t) {
    .Call('_saccadr_compute_velocity_ek', PACKAGE = 'saccadr', x, trial, time_window_in_samples, delta_t)
}

Try the saccadr package in your browser

Any scripts or data that you put into this service are public.

saccadr documentation built on Sept. 8, 2023, 5:13 p.m.