I'm producing an introductory R guide for my company. I'm doing a little demo of the R help function (shorthand)
?mean
This is in a knitr chunk:
<<eval=FALSE>>=
?mean
@
Output:
`?`(mean)
I would prefer that it outputs it as I type it, i.e. ?mean
not ?(mean)
(with backticks). Does anyone know of a workaround for this?
Thanks!
Apologies if this is a repeat question or has a very simple solution - it's not an easy topic to search for!
Setting tidy=FALSE
will give you the result you're looking for:
<<eval=FALSE, tidy=FALSE>>=
?mean
@
Output
?mean
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With