0

I have a developed a shiny app that displays Euro amounts on the y-axis label. It does not render in the plot output. How do I get around this issue?

The following is in the server.R:

plot(monthRange, euroPerMonth/1000, 
     type="l",
     main="Cost",
     xlab="Months",
     ylab="€ (000)")    

The closest I have come across is this; but, I am not sure how to apply this in shiny.

Community
  • 1
  • 1
cogitoergosum
  • 2,309
  • 4
  • 38
  • 62

1 Answers1

0

The following minimal example does plot the Euro sign correctly.

Place the code in a new R file and call it app.R

server <- function(input, output) {
output$cost <- renderPlot({
    plot(2, main="Cost", xlab="Months", ylab="€") 
  })
}

ui <- fluidPage(
    mainPanel(plotOutput("cost"))
)

shinyApp(ui = ui, server = server)

When running this I get the following GUI with the Euro sign plotted. enter image description here

Hope this helps.

Community
  • 1
  • 1
symbolrush
  • 7,123
  • 1
  • 39
  • 67