R/getMaxPosSlope.R

Defines functions getMaxPosSlope

Documented in getMaxPosSlope

getMaxPosSlope <-
function(timSerVals) {
  diffTimSerVals <- diff(timSerVals)
  maxPosSlope <- NULL
  if (any(diffTimSerVals > 0)) {
    posDiffTimSerVals <- diffTimSerVals[which(diffTimSerVals > 0)]
    maxPosSlope <- max(posDiffTimSerVals, na.rm = TRUE)
  }
  maxPosSlope
}

Try the KarsTS package in your browser

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

KarsTS documentation built on Jan. 16, 2021, 5:07 p.m.