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 April 6, 2023, 1:09 a.m.