R/pathSummary.R

Defines functions pathSummary

Documented in pathSummary

#' Summary table of an animal's tracked path
#'
#' This function produces a summary table of total distance, mean velocity, total duration and the number of frames where tracking was unsuccessful, based on a list object generated by the \code{trackPath} function.
#' @param path.list a list object created by the \code{trackPath} function
#' @return A dataframe with summary info of an animal's path.
#' @export
pathSummary = function(path.list) {
  dat = data.frame(totalDistance = as.numeric(path.list$total.distance), meanVelocity = as.numeric(path.list$mean.velocity), totalDuration = as.numeric(path.list$total.duration), totalBreaks = as.numeric(length(path.list$breaks)))
  return(dat)
}
gunpowder78/pathtrackr documentation built on May 28, 2019, 8:54 p.m.