knitr::opts_chunk$set( collapse = TRUE, comment = "." )
For continuous data summaries, we can add units to the data summary tables.
We make a named list with units for each column we are summarizing.
units <- list(WT = "(kg)", BMI = "(kg/m2)", SCR = "(g/dL)")
Here we created the list manually; you can also pull this information out of the data specification object.
We pass this unit list into the continuous covariate table function
library(pmtables) data <- pmtables:::data("id") pt_cont_long( data, cols = "BMI,SCR,WT", units = units )
pt_cont_wide( data, cols = "WT,BMI,SCR", units = units )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.