I use Rnw files to create exams for my students, I put separate quiz into child Rnw file and include them in the main Rnw in the way
<<child="xx.Rnw">>@
The xx.Rnw contains the problem statement and also the answer. I want to have two versions of the exam, one without the answer and one with the answer. Which means I need something that could conditionally generate two types of pdf.
The answer part is a mixer of <<>>@ code and latex. Anyone has a good idea how to do this in an agile way? Thanks!