final_report = FALSE

knitr::opts_chunk$set(echo = FALSE, warning = !final_report, message = !final_report, fig.height = 6, fig.width = 8, fig.align = 'center')

set.seed({{format(Sys.Date(), format = "%Y%m%d")}})
## Set up
library(biostatR)
library(tidyverse)
library(gt)
library(magrittr)
library(captioner)
library(lubridate)
library(glue)

# setting MSK ggplot theme, and color palette
plot_font_size = 13

mskRvis::set_msk_palette()

theme_set(theme_set(mskRvis::theme_biostat()) + 
            theme_bw() + 
               theme(text = element_text(size = plot_font_size), 
                     axis.text = element_text(color = "black"), 
                     legend.position = 'bottom'))

# Set custom gtsummary theme if exists in the bstfun::theme_gtsummary_msk
bstfun::theme_gtsummary_msk('leej22')
## Data import

# Location of data
options(path_data = "")

# importing master analytic data set
dat <- readRDS(file = bstfun::path_data("dat.Rds", data_folder_name = "data"))
## Setting up Table and Fig numberings ------------------
  tbl_cap = captioner(prefix = "Table")
  fig_cap = captioner(prefix = "Figure")

## table captions --------------
  tbl_cap("tab1", "Descriptive summaries of baseline characteristics.")


## figure captions --------------
  fig_cap("fig1", "Example figure.")

The following report is generated using the following files:

Summary {-}

v01 (r Sys.Date())

Questions {-}

Data


Outcomes




ddsjoberg/bstfun documentation built on July 4, 2023, 10:59 a.m.