df <- data.frame(stringsAsFactors = FALSE,
cdc15_10 = c(-0.16, NA, -0.37, NA, -0.43),
cdc15_30 = c(0.09, NA, -0.22, NA, -1.33),
cdc15_50 = c(-0.23, NA, -0.16, NA, -1.53))
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
selectInput('xcol', 'X Variable', dimnames(df)[[2]]),
selectInput('ycol','Y Variable',dimnames(df)[[1]])),
mainPanel(plotOutput('plot')) ))
#> Error in fluidPage(sidebarLayout(sidebarPanel(selectInput("xcol", "X Variable", : could not find function "fluidPage"
server <- function(input, output) {
selectedData <- reactive({
Q6[, c(input$xcol, input$ycol)]
})
output$plot<-renderPlot({
plot(df$X,df$y)
})}
shinyApp(ui=ui,server=server)
#> Error in shinyApp(ui = ui, server = server): could not find function "shinyApp"