0

I'm trying to use question marks in a code block using knitr, but in the compiled pdf always puts quotes around it, so, for example

<<helpCode, eval=FALSE>>= 
?rnorm 
@

comes out as

'?'rnorm

Is there a way to keep this from happening?

  • Can't reproduce this; in RStudio with a default 'new sweave document' with your chunk added I end up with > ?rnorm as ouput... – Thell Sep 4 '12 at 16:25
  • @Thell you are probably using Sweave, and the OP is using knitr. BTW, I think this question is better to be posted on SO instead. – Yihui Xie Sep 4 '12 at 17:35
2

Use the chunk option tidy=FALSE.

Not the answer you're looking for? Browse other questions tagged or ask your own question.