Thanks Rainer and Grant for your suggestions. A couple of things: 1) My current code does what I want, the second time. Its advantage is that everything is kept inside of one .org file. Also, I am wondering if it is an R/ESS issue.
2) Grant, I tried your code, but there seem to be some missing headers. Do you have a complete minimal example that exhibits the behavior that you have demonstrated?