I'm trying to use a couple of nifty functions that I cribbed from a script from the Twin Workshop. When I try to use
formatOutputMatrices or tableFitStatistics I get an error message saying R "could not find function".
Those functions and others are in a helper file (i.e., not part of OpenMx) called "GenEpiHelperFunctions.R"
To access them you need to
1. Have a copy of the file. Yyou can grab a copy here for example: http://ibg.colorado.edu/cdrom2010/bartels/MultivariateTwinAnalysis
2. load it into R using the source() function.
For this to work the helper file needs to reside in your current working directory (which you can see by typing
getwd() and can set with setwd() (or cmd-D in OS X)
Wow. You guys are fast! Thanks. Which file is better, the one from the workshop or the one from here http://openmxhelpers.googlecode.com/svn/trunk/genEpi.lib.R
Thank you very much,
I think they are the same (you could compare them). Really the advice differs only in whether you need to be online to pull th file in over a URL.
With un-supported files like that, though they are a great convenience, you should look through each function to ensure you know what is happening behind the scenes, and ensure it is what you want/expect.
One option is to use the following line in your script:
Another option is to see if the mxCompare() function does what you want. See ?mxCompare. That function is maintained by the development team. I'm not sure whether the Gen Epi Helper Functions are maintained.