reshapeTs: Reshapes a 2D concatenated time series into 3D according to...

Description Usage Arguments Value Examples

View source: R/dgm.R

Description

Reshapes a 2D concatenated time series into 3D according to no. of subjects and volumes.

Usage

1
reshapeTs(ts, N, V)

Arguments

ts

a 2D time series volumes x nodes.

N

No. of subjects.

V

No. of volumes.

Value

M 3D matrix, time series x nodes x subjects.

Examples

1
2
3
4
5
6
7
# Let's say subjects are concatenated in a 2D matrix
# (samples x nodes), with each having 200 samples.
# generate some sample data
N=20
Nn=5
x = array(rnorm(200*N*Nn), dim=c(200*N,Nn))
ts = reshapeTs(x,N,200)

DGM documentation built on Dec. 11, 2021, 9:54 a.m.