The short answer is you cannot. Inline R code is always evaluated.
When it is not evaluated, I doubt if your output still makes sense,
e.g. "The value of x is `r x`." becomes "The value of x is ." That
sounds odd to me.
If you want to disable the evaluate of inline code anyway, you may use
a
Well, strictly speaking knitr and rmarkdown are a contributed packages and the
official contact for any contributed package is found via the maintainer()
function. The Posting Guide indicates that R-help should only be used as a
backup if that avenue is a dead end.
To be fair to the OP, there
On Tue, Nov 10, 2015 at 9:00 AM, Yihui Xie wrote:
> The short answer is you cannot. Inline R code is always evaluated.
> When it is not evaluated, I doubt if your output still makes sense,
> e.g. "The value of x is `r x`." becomes "The value of x is ." That
> sounds odd to me.
>
I do have an Rmd where I would like to conditionally evaluate the second part.
So far I am working with :
```{r}
if(length(specLibrary@ionlibrary) ==0){
library(knitr)
opts_chunk$set(eval=FALSE, message=FALSE, echo=FALSE)
}
```
Which disables the evaluation of subsequent chunks.
However my
Strictly speaking, wrong email list.
Markdown is R Studio software, and you should post on their support site.
Cheers,
Bert
Bert Gunter
"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
-- Clifford Stoll
On Tue, Nov 10, 2015 at 2:40 AM,
5 matches
Mail list logo