我在Shiny-UI中使用以下代码通过链接传递变量值,但这不起作用。
" href =粘贴(" http://10.219.5.109:8597/apps/cc_new/?cc_input=",输入$ cc)"
我如何传递变量值?
这是ui-server部分:
ui <- dashboardPage(
dashboardHeader(title = h4("Costcenter Invoice Trend")),
dashboardSidebar(
textInput("cc_input", label = h4("Enter Costcenter"), value = get_quarter()),
h6("(Default is Costcenter with highest deviation)"),
submitButton("Submit")
),
dashboardBody(
rpivotTableOutput("mypivot", width = "100%", height = "100%"),
h4("Costcenter Invoice Analysis!",a(href= paste("http://10.219.5.109:8597/apps/?cc_input=",input$cc_input)))
))
server <- function(input, output,session) {
output$mypivot = renderRpivotTable({
got_data<-get_data(input$cc_input)
options(scipen=999)
rpivotTable(data=got_data, col="Quarter", rows = "Vendor", aggregatorName="Sum", vals = "Tool_Cost",
rendererName="Line Chart")
})
}
shinyApp(ui, server)