R/twoDirections.R

Defines functions `twoDirections`

`twoDirections` <-
function(x,w) {
zinc<-pava(x,w); zdec<--pava(-x,w)
sinc<-sum(w*(zinc-x)^2); sdec<-sum(w*(zdec-x)^2)
if (sinc < sdec) return(zinc) else return(zdec)
}

Try the homals package in your browser

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

homals documentation built on May 2, 2019, 6:51 p.m.