IIRC I put ~30 minutes into trying to figure it out, hit a roadblock, and went back to using R here-documents (err, multi-line strings). Just now I put ~5 minutes into trying to figure out what the roadblock was but I can't find much info on the compilation process. I'd be very grateful for any pointers you have :)