File: stinteraction.R

package info (click to toggle)
r-cran-spacetime 1.2-8%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,300 kB
  • sloc: sh: 13; makefile: 2
file content (8 lines) | stat: -rw-r--r-- 206 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
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
}