I use ggplot2to create a point. One item tag has a dagger (†). The dagger appears in the plot when viewed in RStudio, but it is replaced ... when I save the chart in pdf. Is there a way to prevent the conversion of the graphics device into my dagger ...?
Here is a small example:
library(ggplot2)
# data
dat <- data.frame(VARIABLES=c("Item 1", "Item 2 †"),
est=c(.3, .5),
min=c(.2, .4),
max=c(.4, .7))
# plot
ggplot(dat, aes(x=reorder(as.character(VARIABLES),
est), y=est)) +
geom_pointrange(aes(ymin=min,
ymax=max),
linetype="dashed") +
geom_point(size=3) +
ylim(-1,1) +
theme_bw() +
theme(legend.position="none") +
coord_flip()
#---
# dagger appears in viewer

ggsave(filename="myfig.pdf")

source
share