问题
I know that the question about how to integrate greek symbols into axis titles in ggvis plots was answered by Thomas K in Special symbols in ggvis
library(ggvis)
title <- "CH\u2084 (\u03BC mol)"
mtcars %>%
ggvis(~wt, ~mpg) %>%
layer_points() %>%
add_axis('x', orient = 'top', title = title)
The solution seems straightforward but unfortunately does not work for me. I am using R studio and it plots the diagram but instead of the µ mol displays a little question mark in a diamond (rhombus) shape. The same happens if I attempt any other Greek letters. Any ideas whats going on? Do I have to install a certain package first or is it a problem with R studio? Thank you very much!
edited -----------------
Okay, sorry for not mentioning that: I am using Microsoft Windows 7 Professional and R studio. output of devtools::session_info() is:
Session info setting value
version R version 3.2.2 (2015-08-14) system i386, mingw32
ui RStudio (0.99.486)
language (EN)
collate English_Ireland.1252
tz Europe/London
date 2015-11-02
Packages package * version date source
assertthat 0.1 2013-12-06 CRAN (R 3.2.2) Cairo * 1.5-9 2015-09-26 CRAN (R 3.2.2) DBI 0.3.1 2014-09-24 CRAN (R 3.2.2) devtools 1.9.1 2015-09-11 CRAN (R 3.2.2) digest 0.6.8 2014-12-31 CRAN (R 3.2.2) dplyr * 0.4.3 2015-09-01 CRAN (R 3.2.2) ggvis * 0.4.2 2015-06-06 CRAN (R 3.2.2) htmltools 0.2.6 2014-09-08 CRAN (R 3.2.2) httpuv 1.3.3 2015-08-04 CRAN (R 3.2.2) jsonlite 0.9.17 2015-09-06 CRAN (R 3.2.2) lazyeval 0.1.10 2015-01-02 CRAN (R 3.2.2) magrittr 1.5 2014-11-22 CRAN (R 3.2.2) memoise 0.2.1 2014-04-22 CRAN (R 3.2.2) mime 0.4 2015-09-03 CRAN (R 3.2.2) R6 2.1.1 2015-08-19 CRAN (R 3.2.2) Rcpp 0.12.1 2015-09-10 CRAN (R 3.2.2) shiny 0.12.2 2015-08-05 CRAN (R 3.2.2) tidyr * 0.3.1 2015-09-10 CRAN (R 3.2.2) xtable 1.7-4 2014-09-12 CRAN (R 3.2.2)
回答1:
I had a similar problem and it was because I was running R on a 32 bit system.
来源:https://stackoverflow.com/questions/33476182/special-symbols-in-ggvis-no2