You are here

Revision of helper-functions from Sun, 09/27/2009 - 06:53

Revisions allow you to track differences between multiple versions of your content, and revert back to older versions.

Wiki home page

Please add material here as you learn...

If you have questions not answers, then add those here: That's how a wiki works.

Ideas and example functions that extend OpenMx, encapsulate tedious work, and make scripts easier to write or more compact.

Read a Lower triangle file
source

 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...