use summarytools::dfSummary() output in plumber?

I am trying to figure out a way to pick up the cute visualization provided by summarytools::dfSummary() and make it available through a plumber API. The documentation for the latter Summarytools in R Markdown Documents points down to the way to create the HTML output with print( dfSummary_object, method="render") and the various options to simplify the output. However all I am getting from the plumber API when it is running is "An exception occurred."

This is how far I've been able to get -- I think I need to use the HTML serializer but that's where my knowledge ends.

#* Display the dfsummary 
#* @serializer html
#* @get /dfsummary
function() {
  return(print(dfSummary(mtcars, 
                  varnumbers   = FALSE, 
                  graph.magnif = 0.6),
        method = 'render', headings=FALSE, bootstrap.css=FALSE) )
}

This topic was automatically closed 21 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.