[問題] shiny deploy 中文問題
[問題類型]:程式諮詢
[軟體熟悉度]:入門
[問題敘述]:
在 RStudio中直接Run App 可以正常顯示中文 http://miupix.cc/pm-6FRMG9
但按publish deploy去shinyapps.io後,會出現 http://miupix.cc/pm-HJYUTX
已經試過在RStudio內Save with Encoding將ui.R server.R轉成UTF-8
以及將兩個檔案用Notepad++ 轉成UTF-8(BOM)再上傳都無法順利解決囧
麻煩各位了!!謝謝!!
[程式範例]:
## ui.R
library(shiny)
shinyUI(
fluidPage(
radioButtons("Buttons","qq",list("b1"="qqq","b2"="aaa","b3"="zzz"))
,mainPanel(
plotOutput("vvv")
,dataTableOutput("test")
)
)
)
## server.R
library(shiny)
shinyServer(
function(input,output){
output$vvv=renderPlot({
if(is.null(input$Buttons)==FALSE){
switch(input$Buttons
,qqq={plot(rnorm(100,0,1),axes=F,main="哈囉你好")
axis(1)}
,aaa=plot(rchisq(100,1))
,zzz=plot(x=1,y=1))
}
})
output$test=renderDataTable({
if(is.null(input$Buttons)==FALSE){
switch(input$Buttons
,qqq=as.data.frame(c("aa"))
,aaa=as.data.frame(c("bb")))
}
})
}
)
[環境敘述]:
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=Chinese (Traditional)_Taiwan.950 LC_CTYPE=Chinese
(Traditional)_Taiwan.950
[3] LC_MONETARY=Chinese (Traditional)_Taiwan.950 LC_NUMERIC=C
[5] LC_TIME=Chinese (Traditional)_Taiwan.950
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_0.12.0
loaded via a namespace (and not attached):
[1] bitops_1.0-6 digest_0.6.8 htmltools_0.2.6 httpuv_1.3.2
jsonlite_0.9.16
[6] mime_0.3 R6_2.0.1 Rcpp_0.11.6 RCurl_1.95-4.6
RJSONIO_1.3-0
[11] rstudio_0.98.1017 rstudioapi_0.3.1 shinyapps_0.3.64 tools_3.1.1
xtable_1.7-4
[關鍵字]: shiny deploy 中文
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 113.28.26.110
※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1433256669.A.402.html
※ 編輯: swedrf0112 (113.28.26.110), 06/02/2015 22:57:22
→
06/03 01:46, , 1F
06/03 01:46, 1F
→
06/03 19:53, , 2F
06/03 19:53, 2F
→
06/03 19:53, , 3F
06/03 19:53, 3F
→
06/03 19:54, , 4F
06/03 19:54, 4F
→
06/03 23:20, , 5F
06/03 23:20, 5F
→
06/03 23:21, , 6F
06/03 23:21, 6F
R_Language 近期熱門文章
PTT數位生活區 即時熱門文章