After using R(D)COM and Matlab R-link for a while, I do not recommend it. The COM interface has trouble parsing many commands and it is difficult to debug the code. I recommend using a system command from Matlab as described in the <a href="http://rwiki.sciviews.org/doku.php?id=tips:callingr:matlab">R Wiki</a>. This also avoids having to install RAndFriends.
Hi Joel, thanks for the comments.
In answer, I don't generally use panel like that (rather, I mod the script and run it from scratch again), but it can be done if you prefer messing around at the command line. As I say, this is relatively untested because I don't use it, so ymmv.
I think if you delete a child panel, everything behaves, and you can call delete on an array of panels. So, in your example, try:
delete(p(1).children); % p(1).reset()
05 Dec 2013
Like subplot, but easier, and WYSIWYG export to file. Also fixes dashed/dotted lines in export.