bug report forum?

Posted on
Picture of user. carey Joined: 10/19/2009

(1) i know that forums are for discussion, but i cannot find a place on the website for potential bug reports. would a forum of this name be useful?

(2) here is a place to start. submit the following:
library(OpenMx)
thisOMxModel <- mxModel(name="testModel")
thisOMxModel <- mxModel(thisOMxModel, mxMatrix(name="Afac", type="Full",nrow=8,ncol=5))
Efac <- mxMatrix(name="Efac", type="Full",nrow=8,ncol=5)
thisOMxModel <- mxModel(thisOMxModel, Efac)
testit <- mxModel(thisOMxModel, mxMatrix(name=Afac), remove=TRUE)
testit <- mxModel(thisOMxModel, Efac, remove=TRUE)

(3) i get errors on both the first and second "testit" object assignments. have no clue whether this is a bug in OpenMx or a problem with insufficient documentation on the "remove" option. pardon stupidity--am just learning R.

greg

Replied on Sun, 11/15/2009 - 16:10
Picture of user. mspiegel Joined: Jul 31, 2009

Hi Greg,

For now we are using the message forums as the location for the users to post bugs. If a developer opens a ticket on that bug, then usually a link will be provided in the forum comments to track the ticket status. We may switch over to public issue tickets, but this is something the development team will need to decide as a group.

Replied on Thu, 11/19/2009 - 03:02
Picture of user. tbates Joined: Jul 31, 2009

In this line,
mxModel(thisOMxModel, mxMatrix(name=Afac), remove=TRUE)
# Error in single.na(name) : object 'Afac' not found

The error arises because the name "Afac" is a string, but is not in quotes. also, mxMatrix will verify the matrix being created and throw an error (no row,col specified), before passing this on to mxModel to evaluate with remove = T.

So less error prone to provide the actual matrix you wish to remove, not just something with the same name.

Replied on Thu, 11/19/2009 - 18:00
Picture of user. mspiegel Joined: Jul 31, 2009

In reply to by tbates

The behavior of OpenMx 0.2.2 is to assume string arguments in mxModel() when remove=TRUE. I apologize this was not documented. So the following code segment would work in the current library:

library(OpenMx)
thisOMxModel <- mxModel(name="testModel")
Afac <- mxMatrix(name="Afac", type="Full",nrow=8,ncol=5)
Efac <- mxMatrix(name="Efac", type="Full",nrow=8,ncol=5)
thisOMxModel <- mxModel(thisOMxModel, Afac, Efac)
testit <- mxModel(thisOMxModel, "Afac", "Efac", remove=TRUE)

I've checked in a patch to our code repository so in OpenMx 0.2.3 you will be able to mix character strings and named entities when using mxModel(..., remove=TRUE). When the next version is released, then the following example will work:

library(OpenMx)
thisOMxModel <- mxModel(name="testModel")
Afac <- mxMatrix(name="Afac", type="Full",nrow=8,ncol=5)
Efac <- mxMatrix(name="Efac", type="Full",nrow=8,ncol=5)
thisOMxModel <- mxModel(thisOMxModel, Afac, Efac)
testit <- mxModel(thisOMxModel, Afac, Efac, remove=TRUE)

Thank you for bringing this to our attention!