R/r-utility-midbrk.R

Defines functions midbrk

Documented in midbrk

## calculate breaks in the middle between consecutive vector elements
midbrk <- function(v) { v[2:length(v)]-0.5*diff(v) }


if (FALSE)
{

   # usage example
midbrk(1:10)
midbrk(2*(1:10))
midbrk(sort(unique(weatherr$temperature)))

}
42n4/dmr.util documentation built on May 20, 2019, 2:02 p.m.