mxRename {OpenMx}R Documentation

Rename MxModel or a Submodel

Description

This functions renames either the top model or a submodel to a new name. All internal references to the old model name are replaced with references to the new name.

Usage

mxRename(model, newname, oldname = NA)

Arguments

model

a MxModel object.

newname

the new name of the model.

oldname

the name of the target model to rename. If NA then rename top model.

Value

Return a mxModel object with the target model renamed.

References

The OpenMx User's guide can be found at http://openmx.psyc.virginia.edu/documentation.

Examples


modelA <- mxModel('modelA')
modelB <- mxModel('modelB')
modelC <- mxModel('modelC', modelA, modelB)

# Rename modelC to model1
model1 <- mxRename(modelC, 'model1')

# Rename submodel modelB to model2
model1 <- mxRename(model1, oldname = 'modelB', newname = 'model2')


[Package OpenMx version 1.2.0-1931 Index]