This is the code that I am trying to run, can anybody help?
library(shiny)
library(dplyr)
library(magrittr)
ui <- fluidPage(
textInput('id', 'Participant ID', placeholder = 'Enter ID here...'),
fileInput('csv', 'Input CSV', accept = '.csv'),
plotOutput('hist')
)
server <- function(input, output, session) {
data <- reactive({
req(input$csv)
req(input$id)
read.csv(input$csv$datapath)
})
output$hist <- renderPlot({
data() %>%
filter(id %in% input$id) %$%
hist(dep_1)
})
}
shinyApp(ui, server)