I have multitple DataTables which I need to print in a PDF Document. HTML Document works as it retains formatting.
artistTable1.data <- reactive({
df <- artistData.filtered()
df <- df[c("old_level", "level", "reason", "rank", "apacDominant")]
# names(df) <- c("ARTIST (click for wikipedia)","LEVEL", "REASON", paste0("RANK (of ", my.sum(artistData$hasLevel), " ranked artists)"), "RISK FLAG(S)")
datatable(df, filter = "none", escape = FALSE,
rownames = FALSE, caption = "HIGH LEVEL DATA SUMMARY",
options = list(columnDefs=list(list(targets = 0:3, class="dt-center")),
paging = FALSE, searching = FALSE, autoWidth = FALSE, lengthChange = FALSE, info = FALSE, ordering = FALSE),
class = 'cell-border hover compact')
})
output$artistTable1 <- renderDataTable({
artistTable1.data()
})
I'm aware that Datatables (reactive) can't be used in Static PDF Documents. Webshot was a fix but it ruins the formatting.
I have an RMarkdown file which is generates the reports in PDF and HTML for me. The knitr package uses "webshot" but doesn't retain the formating of the HTML Document. Can i build this into the RMarkdown?
Are there any alternatives?