[問題] shiny io 中文顯示問題
[問題類型]:
程式諮詢(我想用R 做某件事情,但是我不知道要怎麼用R 寫出來)
[軟體熟悉度]:
請把以下不需要的部份刪除
入門(寫過其他程式,只是對語法不熟悉)
[問題敘述]:
大家好我又來了m(_ _)m
最近在使用shiny為公司寫給行銷人員使用的報表
之前就發現有中文顯示問題
估狗後增加一個global.R
內容為 options(shiny.usecairo = FALSE)
但還是無法掛上shiny io
錯誤訊息大概都是這樣
Failed to lint file 'server.R'
The linter failed with message:
invalid multibyte string at '<e7><99><bc>?欧㕑") %>%'
Failed to lint file 'ui.R'
The linter failed with message:
invalid multibyte string at '<e7><99><bc>?<87>','
Failed to lint file 'server.R'
The linter failed with message:
查看warnings()
Warning messages:
1: In gregexpr("../", content, fixed = TRUE) :
input string 112 is invalid in this locale
2: In gregexpr("../", content, fixed = TRUE) :
input string 138 is invalid in this locale
...
...
...
都是我寫中文的行數
想詢問大家要如何解決
謝謝
[程式範例]:
[環境敘述]:
R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
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
[關鍵字]:
shiny io 中文顯示
--
So we beat on, boats against the current, + .
borne back ceaselessly into the past. . + ‧ .
-F. Scott Fitzgerald <The Great Gatsby> .
於是我們繼續往前掙扎,像逆流中的扁舟, ◢
被浪頭不斷地向後推入過去。 ▁▂▁ ▁▂▂▂▂▁ ◥▇◤
▆▅▅▄▄▅▆▇▇▇ -F. 史考特‧費滋傑羅 <大亨小傳>███▇▇▆▅▆▇▄▅▆▇█
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 210.63.206.33
※ 文章網址: https://www.ptt.cc/bbs/R_Language/M.1479700332.A.CE4.html
推
11/21 12:37, , 1F
11/21 12:37, 1F
→
11/21 12:37, , 2F
11/21 12:37, 2F
我是參考這份
http://shiny.leg.ufpr.br/daniel/022-unicode-chinese/
我有另外寫一個英文版QQ
但是有些訊息一定要顯示中文才能給行銷做判斷
所以滿苦惱的 只能往server端前進了嗎
→
11/21 16:04, , 3F
11/21 16:04, 3F
→
11/21 17:29, , 4F
11/21 17:29, 4F
→
11/22 01:33, , 5F
11/22 01:33, 5F
推
11/22 08:56, , 6F
11/22 08:56, 6F
→
11/22 08:57, , 7F
11/22 08:57, 7F
→
11/22 08:59, , 8F
11/22 08:59, 8F
未來應該會架站,這也是之後彙整一些資料會比較方便的模式,就在等公司回復XD
原來io有時數限制(驚)
大概有多久啊??
→
11/22 09:10, , 9F
11/22 09:10, 9F
推
11/22 10:05, , 10F
11/22 10:05, 10F
想詢問怎麼解決QQ 目前是我一有中文就掛失敗
我是3.3.2版
→
11/22 15:23, , 11F
11/22 15:23, 11F
→
11/22 15:24, , 12F
11/22 15:24, 12F
→
11/22 15:25, , 13F
11/22 15:25, 13F
→
11/22 15:25, , 14F
11/22 15:25, 14F
因為輸出Table有一欄中文可能會有一些亂碼,所以都會error...
擷取來源是FB的發文內容
推
11/22 18:22, , 15F
11/22 18:22, 15F
推
11/22 18:26, , 16F
11/22 18:26, 16F
嘗試之後連跑在本機都會失敗(汗
試過Save with Encoding > UTF-8 沒有用...
現在的encoding 是"native.enc"
我把本機的vm開起來試著在ubuntu的情況下跑跑看好了
推
11/22 19:17, , 17F
11/22 19:17, 17F
→
11/22 19:19, , 18F
11/22 19:19, 18F
→
11/22 19:19, , 19F
11/22 19:19, 19F
推
11/22 19:42, , 20F
11/22 19:42, 20F
感謝Q__Q 我明天再試一次,今天只有把程式碼放在公司電腦
※ 編輯: samex4x4 (36.224.0.205), 11/22/2016 20:59:49
還是都error ^^|||
謝謝大家幫我想了這麼多辦法,我還是爽快的去架server了
未來公司也會傾向這塊
希望這帖可以幫助其他有相同問題的人~~~
※ 編輯: samex4x4 (210.63.206.33), 11/23/2016 11:16:37
※ 編輯: samex4x4 (210.63.206.33), 11/23/2016 11:28:49
R_Language 近期熱門文章
PTT數位生活區 即時熱門文章