Defines functions arrayTSData

arrayTSData <-
function (data, N, T, R, skip)
	ts = array (0, dim = c(N, T, R))
	for (r in 1:R)
		ts[,,r] = as.matrix (data[,skip + (0:(T-1))*R + r])

	return (ts)

Try the DIRECT package in your browser

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

DIRECT documentation built on May 29, 2017, 10:59 a.m.