ggvis用ISO / IEC 8859-1绘制

时间:2015-12-14 16:02:25

标签: r ggvis

R的默认编码是ISO / IEC 8859-1,它允许我处理包含诸如åäö等字母的数据。但是,ggvis不允许这样的信件。

编辑:包括会话信息

sessionInfo()
R version 3.2.3 (2015-12-10)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=Swedish_Sweden.1252  LC_CTYPE=Swedish_Sweden.1252    LC_MONETARY=Swedish_Sweden.1252 LC_NUMERIC=C                   
[5] LC_TIME=Swedish_Sweden.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] readxl_0.1.0 ggvis_0.4.2  dplyr_0.4.3 

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.2     digest_0.6.8    assertthat_0.1  mime_0.4        R6_2.1.1        xtable_1.8-0    jsonlite_0.9.16 DBI_0.3.1       magrittr_1.5   
[10] lazyeval_0.1.10 tools_3.2.3     shiny_0.12.2    httpuv_1.3.3    parallel_3.2.3  htmltools_0.2.6

正如预期的那样,使用r plot

没有问题
data <- data.frame(Ålder = c(24:34), x = c(1:11))

plot(data$Ålder, data$x)

With r plot 但是,当使用ggvis做同样的事情时,Å会被问号替换

data %>%
  ggvis(~Ålder, ~x)%>%
  layer_points()

With ggvis plot

是否可以将ggvis与ISO / IEC 8859-1编码一起使用?

1 个答案:

答案 0 :(得分:0)

此行为可能出现在32位计算机上。