Following runs fine for me. The value of ìnput$category` is printied as expected
---
title: "Untitled"
runtime: shiny
output: html_document
---
```{r, echo=FALSE}
library(ggplot2)
inputPanel(
radioButtons("category",label= "Select Category",choices=c("diffPts","diffGF","diffGA","diffGD","diffpos"),inline = TRUE)
)
renderPlot({
print(input$category)
ggplot(faithful, aes(x=eruptions, y=waiting)) + geom_boxplot()
})
```
UPDATE:
The issue appears to be with the aes
function being passed a string. You can use aes_string
instead:
renderPlot({
ggplot(clubSeason, aes_string(x='team', y=input$category)) + geom_boxplot()
})
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…