library(LegendT2dm)
knitr::opts_chunk$set(echo = TRUE, warning=FALSE)
options(kableExtra.latex.load_packages = FALSE)
library(kableExtra)
#knitr::knit_hooks$set(document = function(x) {sub('\\usepackage[]{color}', '\\usepackage[table]{xcolor}', x, fixed = TRUE)})
library(dplyr)
options(knitr.kable.NA = "")
options(knitr.table.format = function() {
  if (knitr::is_latex_output()) {
    "latex"
  } else if (knitr::is_html_output()) {
    "html"
  } else {
    "pipe"
  }
})

# pdf2png <- function(path) {
#   # only do the conversion for non-LaTeX output
#   if (knitr::is_latex_output()) {
#     return(path)
#   }
#   path2 <- xfun::with_ext(path, "png")
#   img <- magick::image_read_pdf(path)
#   magick::image_write(img, path2, format = "png")
#   path2
# }

latex_table_font_size <- 8

List of Abbreviations


\clearpage

Responsible Parties

Investigators

parties <- readr::read_delim(col_names = TRUE, delim = ";", trim_ws = TRUE, file = "
  Investigator; Institution/Affiliation
  George Hripcsak; Department of Biomedical Informatics, Columbia University, New York, NY, USA
  Rohan Khera; Department of Internal Medicine, Yale University, New Haven, CT, USA
  Harlan M. Krumholz; Department of Internal Medicine, Yale University, New Haven, CT, USA
  Yuan Lu; Department of Internal Medicine, Yale University, New Haven, CT, USA
  Patrick B. Ryan; Observational Health Data Analytics, Janssen Research and Development, Titusville, NJ, USA
  Martijn J. Schuemie; Observational Health Data Analytics, Janssen Research and Development, Titusville, NJ, USA
  Marc A. Suchard *; Department of Biostatistics, University of California, Los Angeles, Los Angeles, CA, USA
")

tab <- kable(parties, booktabs = TRUE, linesep = "") %>%
  column_spec(1, width = "10em") %>%
  column_spec(2, width = "35em") %>%
  footnote(general = "* Principal Investigator", general_title = "")

if (knitr::is_latex_output()) {
  tab %>% kable_styling(latex_options = c("striped", "hold_position"),
                        font_size = latex_table_font_size)
} else {
  tab %>% kable_styling(bootstrap_options = "striped")
}

Disclosures


\clearpage

Abstract


\clearpage

Amendments and Updates

amendments <- readr::read_delim(col_names = TRUE, delim = ";", trim_ws = TRUE, file = "
  Number; Date; Section of study protocol; Amendment or update; Reason
  1; 7-Oct-2021; Milestones; Update; Add EU PAS #43551 registration date.
  2; 3-Mar-2022; Analysis; Amendment; Exclude subcutaneous injection device codes in propensity score. Add glycemic control sensitivity analysis.
")

tab <- kable(amendments, booktabs = TRUE, linesep = "")

if (knitr::is_latex_output()) {
  tab %>% kable_styling(latex_options = c("striped", "hold_position"), font_size = latex_table_font_size)
} else {
  tab %>% kable_styling(bootstrap_options = "striped")
}

Milestones

dates <- readr::read_delim(col_names = TRUE, delim = ";", trim_ws = TRUE, file = "
  Milestone; Planned / actual date
  EU PAS registration; 01-Oct-2021 / 07-Oct-2021
  Start of analysis; 01-Nov-2021 
  End of analysis;
  Results presentation;
")

tab <- kable(dates, booktabs = TRUE, linesep = "")

if (knitr::is_latex_output()) {
  tab %>% kable_styling(latex_options = c("striped", "hold_position"), font_size = latex_table_font_size)
} else {
  tab %>% kable_styling(bootstrap_options = "striped")
}

\clearpage

References {-}

\clearpage

\centerline{\Huge Appendix}

(APPENDIX) Appendix {-}




ohdsi-studies/LegendT2dm documentation built on July 4, 2025, 8:25 p.m.