0
Shinyapp 내가 selectInput 일부 값을 선택할 수 있습니다. 그러면 y ~ 선택된 값을 그려 봅니다. 나는 플롯 (mtcars의 $ mpg로 ~ mtcars의 $ 중량) 같은 정의 플롯을 플롯 할 수 있습니다하지만Shinyapps 플롯 SelectInput의 선택에 따라
아무도 나를 도울 수 있습니까 플롯 (mtcars의 $ mpg로 ~ 선택한 값을) 음모 wannt. renderPlot
library(shiny)
ui <- fluidPage(
titlePanel("MyPLot"),
sidebarLayout(
sidebarPanel(
selectInput("variable", "Variable:", c("Cylinders" = "cyl", "Transmission" = "am", "Gears" = "gear"))
),
mainPanel(
plotOutput("distPlot"),
plotOutput("secPlot")
)
)
)
server <- function(input, output) {
output$distPlot <- renderPlot({plot(mtcars$mpg~mtcars$wt) })
output$secPlot <- renderPlot({ plot(mtcars$mpg~input$variable) })
}
shinyApp(ui = ui, server = server)
이 링크 https://shiny.rstudio.com/ 시도 gallery/kmeans-example.html –