R/MFW.R

Defines functions MFW

## This function calculates the smooth for the precision function
MFW <- function(x){
  if(sum(is.na(x)) / length(x) > .5){
    return(rep(NA, length(x)))
  } else {
    return(rep(median(x, na.rm = T), length(x)))
  }
}

Try the gazepath package in your browser

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

gazepath documentation built on Feb. 7, 2020, 3:01 a.m.