Stephen Eglen
2009-Mar-19 13:31 UTC
[R] Using unicode character for 'middle dot' in options(OutDec)
When drawing a graph, I'd like the unicode character 'middle dot' (or something else similar to \cdot in latex) to be used when writing numbers. Something like the following works for me: x <- 1:10 y <- runif(length(x)) par(las=1, bty='n') plot(x,y, ylim=c(0,1), yaxt='n') p <- pretty(y) axis(2, at=p, labels=format(p, decimal.mark="\u00B7")) at least on x11() and pdf() devices. Is it intentional that I can't use a unicode char though for options(OutDec)?> options(OutDec='\u00B7')Error in options(OutDec = "*") : invalid value for 'OutDec' [I've replaced the cdot with the * in the error line above, in case it mangles the email into non-ascii.] R version 2.8.1 (2008-12-22) Thanks, Stephen