R/RmeanSub.R

Defines functions RmeanSub

RmeanSub <- function(v, dich = TRUE) {
	mu.v <- mean(v, na.rm = TRUE)
	if (dich) {
		mu.v <- round(mu.v, 0)
	}
	v <- ifelse(is.na(v), mu.v, v)
	return(v)
}
EccRiley/Riley documentation built on Dec. 3, 2018, 3:08 p.m.