library(DT) datatable(phenotypetable %>% mutate(ModuleNr=paste0('<a href="./modules/module',sub("Module_"," ",ModuleNr),'.html">',sub("_"," ",ModuleNr),'</a>')), class = 'display', extensions = 'Buttons', rownames = FALSE, colnames=gsub("_"," ",colnames(phenotypetable)), options = list(pageLength = 10,dom = 'Bfrtip',buttons = list(list(extend = 'csv',text = "Save CSV", title="SurvivalStats"))), escape=FALSE) %>% formatRound(-1,3) %>% formatStyle(grep("p$|padj$",colnames(phenotypetable)), backgroundColor = styleInterval(c(0.01, 0.05),c("forestgreen","lightgreen","white")))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.