问题
I deplyed my shiny code with wordcloud package.
My local pc can shows perfectly but shinyapps show codes not characters.
My local one is window with no UTF-8, and other local is Ubuntu with UTF-8 both can shows good.
How can I fix it?
sample code server.R
library(wordcloud)
function(input, output, session) {
d1 <- c("강릉교동짬뽕","강릉선교장","강릉오죽헌","강문해변","경포대")
d2 <- c(35,126,192,322,452)
d3 <- data.frame(poi_name=d1, n=d2)
spider_cloud <- d3
output$spider_cloud <- renderPlot({
wordcloud_tmp <- spider_cloud
wordcloud(wordcloud_tmp$poi_name, freq=wordcloud_tmp$n,
scale=c(5,1), rot.per=0,
min.freq = 1, max.words=100,
random.order=F, colors=brewer.pal(8, "Dark2"))
})
}
ui.R
plotOutput("spider_cloud")
captured in shinyapps
来源:https://stackoverflow.com/questions/39119094/wordcloud-encoding-in-shinyapps