R/tukey.R

Defines functions tukey

#------------------------------
# TUKEY BIWEIGHT
#------------------------------

# Robust average of vector x with missing values ignored in the calculation.
tukey <- function(x, c=5, epsilon=1e-4, na.rm=TRUE) {
	x <- x[!is.na(x)]
	return <- tukey.biweight(x, c=c, epsilon=epsilon)
}

Try the PECA package in your browser

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

PECA documentation built on Nov. 8, 2020, 7:24 p.m.