knitr::opts_chunk$set( collapse = TRUE, comment = "." )
These functions create summary tables for continuous data. There is a long format and a wide format.
library(pmtables) library(dplyr) id <- pmtables:::data("id")
A summary of covariates
pt_cont_long(id, cols = "WT,ALB,SCR")
Use the panel argument to split this by, for example, study
pt_cont_long( id, cols = "WT,ALB,SCR", panel = vars(Study = STUDYf) )
There is also a wide format, where variable names go across the table.
pt_cont_wide(id, cols = "WT,ALB,SCR")
We can use the by argument here
pt_cont_wide(id,cols="WT,ALB,SCR",by = vars(Study = STUDYf))
Or use by and panel
pt_cont_wide( id, cols=vars(WT,ALB,SCR), by = vars(Study = STUDYf), panel=vars(Sex = SEXf) )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.