R/zzz.R

Defines functions .onAttach

.onAttach <- function(libname, pkgname) {
  tex_paths <- Sys.which(c('pdflatex', 'lualatex', 'xelatex'))
  if (all(tex_paths=='')) {
    tex_msg <- 'No TeX distribution found. Consider running install_tinytex() to get setup.'
  } else {
    tex_msg <- 'TeX distribution found!'
  }
  
  welcome <- glue::glue('Welcome to CHL5202 - Biostatistics II',
                        'University of Toronto',
                        'Dalla Lana School of Public Health',
                        'Instructor: Kevin Thorpe',
                        'Package Maintainer: Matt Warkentin',
                        '{tex_msg}',
                        .sep = '\n')
  packageStartupMessage(welcome)
  invisible()
}
mattwarkentin/CHL5201 documentation built on March 2, 2020, 5:33 a.m.