Skip to content

Instantly share code, notes, and snippets.

@erikerhardt
Last active May 24, 2022 03:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikerhardt/ef65c515aa16a2a5aa5d10e270a9b6f2 to your computer and use it in GitHub Desktop.
Save erikerhardt/ef65c515aa16a2a5aa5d10e270a9b6f2 to your computer and use it in GitHub Desktop.
moonBook tables
```{r, results='asis'}
# list of column variables for table
list_var_col_names <- "Group"
list_var_col_labels <- "Group"
# list of row variables for table
list_var_row_names <- c(Var[["list"]][["var_resp"]] , Var[["list"]][["var_covar"]] )
list_var_row_labels <- c(Var[["label"]][["var_resp"]], Var[["label"]][["var_covar"]])
fn_root <- "./out/tab1_vars_dx_demo"
fn_tab1 <- paste0(fn_root, "_", "all", ".csv")
dat_tab1 <-
dat_sub %>%
dplyr::filter(Time == "Pre")
e_table1_summaries(
dat_tab1 = dat_tab1
, list_var_col_names = list_var_col_names
, list_var_col_labels = list_var_col_labels
, list_var_row_names = list_var_row_names
, list_var_row_labels = list_var_row_labels
, fn_root = fn_root
, sw_verbose = TRUE
)
tab1_temp <- read.csv(fn_tab1)
knitr::kable(tab1_temp)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment