This is my first app that I am making using Shiny, and I am having some trouble with my reactive plot. My end goal is to be able to use the drop down menu to select client A-D and then plot the datapoints from the columns (Date, ModResult) in a scatterplot when the Update button is pressed. Right now it returns "Error in axis: no locations are finite." The labData data frame has 7 columns: "Client.Name" is column 1, "Date" is column 4, and "ModResult" is column 7. Please let me know if there is any more information that could help in debugging this error!
Thank you!
library(shiny)
ui <- fluidPage(titlePanel("Dilution History"),
selectInput(inputId="client", label="Select Client Name",
choices=levels(labData$Client.Name)), actionButton("update", "Update"),
hr(),
plotOutput("line")
)
server <- function(input, output, session){
#selected client into data frame
selDF <- reactive({data.frame(labData[labData[,1] =="input$client",])
})
output$line <- renderPlot({
plot(selDF()$Date, selDF()$ModResult, ylab="Result", main="Results
For Client X Between Xdate and Ydate")
})
}
shinyApp(ui = ui, server = server)