Self-Generating R Scripts