R/zvalues.R

Defines functions zvalues

Documented in zvalues

#-----------------------------------------------------------|
#  zvalues                                                  |
#  calculating z of bunke et al 2005                        |
#-----------------------------------------------------------|
zvalues<-function(res, ni, xo)
{
	# Differences of 2
	n <- length(res)
	dres <- diff(res)
	z <- c((dres * dres), (dres[n - 1] * dres[n - 1]))/2
	for(i in (1:length(ni))[ni > 1])
		z[xo == i] <- var1(res[xo == i])
	z
}

Try the nlr package in your browser

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

nlr documentation built on July 31, 2019, 5:09 p.m.