【发布时间】:2014-12-22 14:53:16
【问题描述】:
我在 R markdown 交互式文档中遇到了文本编码问题。
除了将工具中的全局文本编码设置为 UTF-8 之外,我没有其他特定设置。
我的文档代码以:
---
runtime: shiny
output:
html_document:
fig_width: 12
fig_height: 8
---
```{r setup, include=FALSE}
library(knitr)
opts_chunk$set(comment="", message=FALSE, fig.width=12, fig.height=8,tidy.opts=list(keep.blank.line=TRUE, width.cutoff=80),options(width=90))
```
```{r, eval=FALSE}
library(devtools)
devtools::install_github("rstudio/dygraphs")
```
...然后有这样的复选框
```{r}
library(shiny)
checkboxGroupInput("structures",
label = h3("Które struktury wyświetlić?"),
choices = series_names,
selected = series_names)
```
我得到这样的输出在错误的编码中。任何想法如何解决这个问题?
编辑:我的看法
> sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Polish_Poland.1250
[2] LC_CTYPE=Polish_Poland.1250
[3] LC_MONETARY=Polish_Poland.1250
[4] LC_NUMERIC=C
[5] LC_TIME=Polish_Poland.1250
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
other attached packages:
[1] DT_0.0.4 xts_0.9-7 zoo_1.7-11 dplyr_0.3.0.2
loaded via a namespace (and not attached):
[1] assertthat_0.1 bitops_1.0-6 DBI_0.3.1
[4] devtools_1.6.1 digest_0.6.6 evaluate_0.5.5
[7] formatR_1.0 grid_3.1.2 htmltools_0.2.6
[10] htmlwidgets_0.3.2 httr_0.6.0 knitr_1.8
[13] lattice_0.20-29 lazyeval_0.1.9 magrittr_1.5
[16] parallel_3.1.2 Rcpp_0.11.3 RCurl_1.95-4.5
[19] RJSONIO_1.3-0 rmarkdown_0.3.10 stringr_0.6.2
[22] tools_3.1.2 yaml_2.1.13
【问题讨论】:
标签: r text encoding markdown shiny