I am working on the shiny app where I would like to display the distribution of Column values as a histogram, by clicking on this column. so far i am trying to rewrite the current code:
output$Histogram <- renderPlotly({
histogram_col <- plot_ly(
x <- list$[[df/dt]]$col,
type = Histogram,
x=~rnorm(100,5) #how do I change this to display the classic distribution with min max mean and std (not only mean and std)
histogram_col <- histogram_col %>% add trace(
type ='histogram',
x=~rnorm(20,5)
histogram_col <- histogram_col %>% layout (barmode = "stack", bargap = 0.2)
histogram_col
)}
and it doesn't work. the UI is supposed to display it as:
plotlyOutput("Histogram", width = "100%", height = "400px"))
How can i make the histogram pick up the values by clicking on a column in a table (or for a drop down for now)? How to design proper histogram based on the column values distribution on dataframes in list? so I can display by choosing the name of the data frame and column name the histogram with distribution? I was using purrr library to get the data in but I think I did this a bit wrong too.