由于编码问题,Shiny似乎处理带有分音不正确的文本.我试过添加options(encoding="UTF-8")但没有改进.
例如:我输入ë并显示Î,但在日志文件中显示{"char":"Ã""}
我希望有人偶然发现了同样的问题.
将文本作为输入处理的可重现示例.
options(shiny.trace = TRUE) # Print debugging info to console
runApp(list(
ui = pageWithSidebar(
headerPanel("Test input characters"),
sidebarPanel(
textInput("char", "Write character", "")
),
mainPanel()
),
server = function(input, output) {
datasetInput <- reactive({ input$char })
}
))
Run Code Online (Sandbox Code Playgroud)
sessionInfo()R版本3.0.2(2013-09-25)平台:i386-w64-mingw32/i386(32位)Shiny_0.7.0并使用chrome
**闪亮的痕迹**
Listening on port 8100
SEND {
"config": {
"workerId": "",
"sessionId": "b32ed6dc994bd484ab4a39cae0903c79"
}
}
RECV {"method":"init","data":{"char":"",".clientdata_pixelratio":1,".clientdata_url_protocol":"http:",".clientdata_url_hostname":"localhost",".clientdata_url_port":"8100",".clientdata_url_pathname":"/",".clientdata_url_search":"",".clientdata_url_hash_initial":"",".clientdata_allowDataUriScheme":true}}
RECV {"method":"update","data":{"char":"ë"}}
Run Code Online (Sandbox Code Playgroud)
更新在我的Mac上探索应用程序,它没有编码问题.
我知道 split 命令是将 df 转换为 df 对象列表的最简单方法,但是如何将它们分配给不同的(单独的)数据帧?
df.List <- split(df, df$column)
Run Code Online (Sandbox Code Playgroud)