Remove all instances of data from a model
For very large data, it can be desirable to discard data after the model is run. That is what the purpose of this function.
Data is discarded from the model and all submodels recursively.
omxModelDeleteData(model)
model |
a MxModel object. |
library(OpenMx) data(demoOneFactor) manifests <- names(demoOneFactor) latents <- c("G") factorModel <- mxModel(model="One Factor", type="RAM", manifestVars = manifests, latentVars = latents, mxPath(from=latents, to=manifests), mxPath(from=manifests, arrows=2), mxPath(from=latents, arrows=2,free=FALSE, values=1.0), mxData(cov(demoOneFactor), type="cov",numObs=500) ) factorFit <-mxRun(factorModel) object.size(factorFit) factorFit <- omxModelDeleteData(factorFit) object.size(factorFit) factorFit$data
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.