Learn R Programming

SimTimeVar (version 1.0.0)

expand_matrix: Longitudinally expand a matrix of single observations by cluster

Description

An internal function not intended for the user. Given a matrix of single observations for a cluster, repeats each cluster's entry in each .obs times.

Usage

expand_matrix(.matrix, .obs)

Arguments

.matrix

The matrix of observations to be expanded.

.obs

The number of observations to generate per cluster.

Examples

Run this code
# NOT RUN {
mat = matrix( seq(1:10), nrow=2, byrow=FALSE)
expand_matrix(mat, 4)
# }

Run the code above in your browser using DataLab