Learn R Programming

OpenMx (version 2.7.9)

imxGentleResize: Resize an MxMatrix while preserving entries

Description

Resize an MxMatrix while preserving entries

Usage

imxGentleResize(matrix, dimnames)

Arguments

matrix
the MxMatrix to resize
dimnames
desired dimnames for the new matrix

Value

a resized MxMatrix

Examples

Run this code
m1 <- mxMatrix(values=1:9, nrow=3, ncol=3,
               dimnames=list(paste0('r',1:3), paste0('c',1:3)))

imxGentleResize(m1, dimnames=list(paste0('r',c(1,3,5)),
                                  paste0('c',c(2,4,6))))

Run the code above in your browser using DataLab