0

我开发了一个闪亮的应用程序,在 y 轴标签上显示欧元金额。它不会在绘图输出中呈现。我该如何解决这个问题?

以下是在server.R

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

我遇到的最接近的是这个;但是,我不确定如何在闪亮中应用它。

4

1 回答 1

0

以下最小示例确实正确绘制了欧元符号。

将代码放在一个新R文件中并调用它app.R

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

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

shinyApp(ui = ui, server = server)

运行此程序时,我得到以下带有欧元符号的 GUI。 在此处输入图像描述

希望这可以帮助。

于 2015-08-26T06:21:21.713 回答