R/arrayTSData.R

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 Sept. 8, 2023, 5:45 p.m.