我正在使用RStudio版本0.98.507。關於初始工作儀器的簡短信息:編碼在閃亮
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
other attached packages:
[1] shinyapps_0.3.53 RJSONIO_1.2-0.2 shiny_0.9.1.9013
loaded via a namespace (and not attached):
[1] bitops_1.0-6 Cairo_1.5-5 caTools_1.17 digest_0.6.4
[5] htmltools_0.2.4 httpuv_1.3.0 Rcpp_0.11.1 RCurl_1.95-4.1
[9] shinysky_0.1.2 tools_3.1.0 xtable_1.7-3
我在閃亮的服務器上部署閃亮的應用程序時遇到問題。問題在某種程度上解決了,但在它再次出現之後。現在我無法再修復它了。我的問題是幫手中的德文字母.R。不幸的是,我無法避免使用它們。像顯示和閃亮教程教導我的,我的採購我的幫助scrpits helpers.R到server.R。 我所有的R腳本都以UTF-8格式謹慎保存。我不能使用命令
options(encoding="UTF-8")
因爲在執行它之後,命令deployApp(「app」)不起作用。我設置位置使用
Sys.setlocale(category = "LC_ALL", locale = "German")
它也行不通。 我不明白,爲什麼mainPanel和側邊欄佈局中的字母是可讀的,但是那些來自helpers.R沒有。有人能幫我解決這個悖論嗎?
例
ui.R
library(shiny)
shinyUI(fluidPage(withMathJax(),
titlePanel("Währung"),
sidebarLayout(position="right",
sidebarPanel(
h5("Bedienfenster"),
sliderInput('x', 'x axis',
value=50, min=3, max=150, step=1,)
),
mainPanel(
plotOutput("Plot")
)
)
))
server.R
shinyServer(function(input, output){
output$Plot <- renderPlot({
x <- rnorm(input$x)
hist(x, main="", xlab="", ylab="")
title(main="Schätzgerade", xlab="Währung", ylab="Dichte")
})
})
部署我獲得以下app後。
您是否嘗試在'source()'命令中設置'encoding ='參數? – MrFlick
當然,它具有相同的效果,如'opitions(encoding =「UTF-8」)' –
那麼它似乎並不表示您對問題的描述足以讓其他人重現。這會讓你很難進一步幫助你。你能把一個最小的工作例子放在一起,讓其他人可以跑來體驗相同的行爲嗎? – MrFlick