I am building a Xaringan deck for a short course on R. I need students to learn the character sequences for assignment <-
and relational operators like !=
.
However, knitting to slides replaces several character sequences with more elegant display characters. For example, <-
becomes a left-pointing arrow (←).
Can I preserve the original characters in slide output?
I still get the replacement inside single backticks (`) for code formatting and even inside R code chunks (```). Escaping the characters with \ does not help.
---
# Two ways to save variables to memory
R has two ways to assign variables: `=` and `<-`.
The following expressions are equivalent:
`turnout_rate = .598` and `turnout_rate <- .598`
When knit to slides, all <-
above are replaced with a left arrow (←) . I would like to keep the original characters <-
.
Thanks in advance for your help!