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.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.