Reputation: 6345
Here's a simple markdown file:
---
title: "blah"
output: html_document
---
```{r}
library(tidyverse)
ggplot(tibble(x=1:2)) +
aes(x=x, y=x) +
geom_col() +
labs(y = "← low high →")
```
Notice the arrows. They show up when running the code via the console to RStudio's plot tab. But for an HTML knit, they don't work:
Upvotes: 4
Views: 76
Reputation: 18691
Use the unicode instead of the actual character:
library(tidyverse)
ggplot(tibble(x=1:2)) +
aes(x=x, y=x) +
geom_col() +
labs(y = "\u2190 low high \u2192")
Upvotes: 3