When used Stanglein a document, the Sweaveoutput includes a comment that gives the name of the fragment. This is incredibly useful in setting up learning to orient students in code when they cut and paste. However, when I use knitrto generate code .Rfrom .Rnw, package names are not included (at least I see):
knit('example.Rnw',tangle=TRUE)
I could run Stanglein a document written for knitr, except that there are incompatibilities in the chunk arguments, which exclude the launch Stanglewithout errors.
Is there a way to force knitrcomments to be created in convoluted Rcode that includes block names (and / or numbers) like native Stangle?
source
share