How can I get the statistical summary of a reactive dataset? The code bellow produces the error: Warning: Error in <-: 'dimnames' applied to non-array
output$sum <- renderTable({
summary(ds())
})
How can I get the statistical summary of a reactive dataset? The code bellow produces the error: Warning: Error in <-: 'dimnames' applied to non-array
output$sum <- renderTable({
summary(ds())
})
That reactive probably returns something that you may not expect.
For debugging you could add an observer that just prints object structure to console:
observe( str(ds()) )
output$sum <- renderTable({
summary(ds())
})
table object from summary() may also not be best choice for tableOutput() / renderTable(), there are quite a few packages that provide summary statistics as data.frames / tibbles, e.g. skimr::skim() / skimr::skim_without_charts(), rstatix::get_summary_stats().
Thank you for your help.