I am trying to show ggplot in R shiny while the x-axis is Hebrew.
My code:
#server
shinyServer(
function(input, output, session) {
output$Plot <- renderPlot({
temp<-data.frame(x=c("ראשון","שני","שלישי"),y=c(1,2,3))
ggplot(temp, aes(x = x, y = y)) + geom_point()
})
})
#ui
shinyUI(fluidPage(
sidebarLayout(
sidebarPanel(),
mainPanel("main panel",
plotOutput('Plot'))
)
))
The plot that I am getting is:

The letters in x-axis are ordered wrongly.
The same plot outside shiny works with no problems.
Any idea how to fix that?
Thanks