dcomtois / summarytools

R Package to Quickly and Neatly Summarize Data
523 stars 78 forks source link

dfSummary and knitr::kable () #169

Open MAGALLANESJoseManuel opened 2 years ago

MAGALLANESJoseManuel commented 2 years ago

DfSummary connect well with kable here: dfSummary(pavi[,-1], plain.ascii = FALSE, varnumbers = FALSE, style = "grid", graph.col=FALSE, na.col = FALSE) %>%kable(caption = "Summary Table")

But, if I set graph.col=TRUE, you see GRAPH as ASCII and some html before it:

image

Can this be solved?

dcomtois commented 2 years ago

Hmmm I don't have an easy solution for this, as this is the intended behavior (and works all right when kable is not used). A work-around could be to manually remove the "Graph" column and rename the "text.graph" column to "Graph". If you can try it and let me know how it goes, that would be appreciated. Thx.