I woulld like to share a demo script to the following directory:
The Wiki says where to put the file, but not technically how to add the file to the directory.
The demos are stored in our subversion source code repository. There are a few steps necessary in order to include a new script in the demo directory:
(1) Make sure there are no commands in the script that are specific to your environment. So eliminate any calls to setwd(). Also data cannot be read using read.table() or similar functions. Replace them with calls to data(), and we'll place the dataset in the OpenMx library as well. Make sure the dataset can be released to the public. The script should not access the internet using source('http://'), we assume all demos work without an internet connection.
(2) Add error checking to the end of the script. See ?omxCheckEnough for the omxCheck* family of functions. See (http://openmx.psyc.virginia.edu/repoview/1/trunk/demo/DefinitionMeans_Pa...) for an example of error checking.
We can commit the file into the repository once the changes have been made.
Must demo scripts always be entered together with data? Are there any options for faking data that work with moderators/interaction effects?
Also you can often reuse one of the datasets already in the package, or perhaps in the base package.
There are now quite a few:
The script could generate its own data as long as the seed etc was set so that it had known-in-advance answers.