Skip to content
Prev 387347 / 398502 Next

A tibble with date column appears different in shiny

Hi Rui

Alas, at last this worked and this is what I did :

1) I stopped debugging and started a fresh new table to display in shiny UI
using this example-https://shiny.rstudio.com/gallery/basic-datatable.html
2) Now instead of the table mpg, I plugged in my us_counties above at first
and it worked :-)

I really don't have an answer as to how this was working fine till 2 days
back with the reactive inputs I had in Shiny UI or the read.csv
<https://stackoverflow.com/questions/14441729/read-a-csv-from-github-into-r>
command for the .csv file in GITHUB.


Thanks so much to you for your help as you tried to relentlessly help me
out the past three days.
*So the conclusion is - Starting afresh with DT::dataTableOutput solved the
issue*

*Code  change*
*===============*

In UI.R:
    tabPanel(strong("Table"),DT::dataTableOutput("dumtable"))

In Server.R
output$dumtable <- DT::renderDataTable(DT::datatable({
     data <- us_counties
       data <- data[data$state == input$state,]


       data <- data[data$county == input$county,]

       data <- data[data$date >= input$date2,]

        head(data,n=input$obs)
   }))
   ====================



Regards
Gayathri


On Thu, 4 Mar 2021 at 21:51, Gayathri Nagarajan <
gayathri.nagarajan at gmail.com> wrote: