rsweaveknitr

Automatically create a report based on an R script and a template with Knitr


I'm using stitch function in Knitr 0.4. It works fine and gives the R script with output in ##. I wonder how to make changes to only show the normal output with R code.

I tried to make the changes in knitr-template.Rnw but it did not work for me. What can I try next?


Solution

  • What you want is unclear, but can probably be achieved by adding the correct option to the auto-report chunk in the template.

    If you want to add the > and + prompts back and remove the ## prefix for the results, you can add prompt=TRUE,comment="".

    If you want to remove the code and only keep the output, you can use echo=FALSE.

    If the output is already in LaTeX, you can use results="tex".