mxFactor() interface

No replies
mspiegel's picture
Offline
Joined: 07/31/2009

The mxFactor() function was introduced in the 0.3.0 release. In the source code repository, it has been updated to accept multiple columns of a data frame. Here is an example of the new functionality:

   nthresh1 <- 1
   nthresh2 <- 12 
   data <- read.table("data/mddndzf.dat", na.string=".",
      col.names=c("t1neur1", "t1mddd4l", "t2neur1", "t2mddd4l"))
   data[,c(1,3)] <- mxFactor(data[,c(1,3)], c(0 : nthresh2))
   data[,c(2,4)] <- mxFactor(data[,c(2,4)], c(0 : nthresh1)) 

This will be included in the next binary release.