R/meanDist.R

Defines functions meanDist

meanDist <- function(x){
  if(!is.null(x$fingers)){
    d <- dist(x$fingers)
  } else {
    d <- dist(cbind(x$x, x$y))
  }
  if(length(d) == 0){
    return(0)
  } else {
    return(mean(d))
  }
}
guiludwig/mat3c documentation built on Dec. 2, 2019, 1:32 a.m.