R/precision.R

Defines functions precision

precision <- function(X, Hz){
  end <- length(X) / (Hz / 10)
  window <- rep(1:end, each = (Hz / 10))
  Smooth <- as.vector(unlist(by(X[1:length(window)], window, MFW)))
  
  return(mean(abs(X[1:length(window)] - Smooth), na.rm = T))
}

Try the gazepath package in your browser

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

gazepath documentation built on Feb. 9, 2020, 5:07 p.m.