R/stinteraction.R

Defines functions stInteraction

Documented in stInteraction

stInteraction <- function(x, ...) { 
	stopifnot(is(x, "STFDF"))
	for (i in 1:(dim(x)[3])) {
		y = as(x[,,i], "xts")
		x[[i]] = as.vector(t(y - (rowMeans(y, ...) %o% colMeans(y, ...))/mean(y, ...)))
	}
	x
}

Try the spacetime package in your browser

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

spacetime documentation built on Sept. 12, 2024, 7:42 a.m.