Hi everyone!
I am a beginner, and I am trying to build a shiny app which lets me upload a csv file and then show me a histogram based on the data from that file.
I know how to write the code to upload the data, and separately how to show random data on histogram on shiny app, but unfortunately I cant do both, because I dont know how to connect the data from the csv to the histogram.
Can someone help me with that?
this is the code:
server <- function(input, output) {
output$contents <- renderTable({
data <- input$file1
if (is.null(data))
return(NULL)
read.csv(data$datapath, header = input$header)
})
**trying to connect between the data and the functions
input$num=data$part_1
output$hist<-renderPlot({hist(data$dep_1, breaks=data$date)})
}
Thank you so much!
One more question, I want my customer to enter an participant ID, which is connected to specific participant with specific data. With that ID I want to build a histogram which shows on x axis the dates and on Y axis the amount of a variable. how can I do that?
Thank you!