Reputation: 199
I am using R Markdown to create slides. At the top of a slide I want to title it "For threshold 3%" (example).
I want to specify this like:
"For threshold (followed by a variable name whose value is 3) followed by '%'" sign.
I thought if I could do it by saying
"For threshold $threshold"
or
"For threshold {'threshold'}" etc.
but it doesn't seem to work!
So, how can I do this? I don't see any examples where the slide title is referencing a variable whose value has to appear in the actual slide.
Upvotes: 0
Views: 640
Reputation: 19857
You can use inline code:
## For threshold `r myvar`%
My slide's text
Obviously, myvar
needs to be defined before the slide's title.
Upvotes: 1