Copyright © 2007-2024 The OpenMx Project
Wiki home page [1]Ideas and example functions that extend OpenMx, encapsulate tedious work, and make scripts easier to write or more compact.
source [2]
readLowerDiagonal <- function(file) { n <- max(count.fields(file)) x <- read.table(file, fill = TRUE, col.names = 1:n) x[upper.tri(x)] <- t(x)[upper.tri(x)] return(x) }
nb: Not industrial strength - requires that the file keeps rows on one line...