dcomtois / summarytools

R Package to Quickly and Neatly Summarize Data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dfSummary and knitr::kable ()

MAGALLANESJoseManuel opened this issue · comments

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?

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.