R/zzz.R

Defines functions .onAttach

.onAttach <- function(libname, pkgname) {
  # https://stackoverflow.com/questions/53941218
  # ggplot2 has its own startup messages, and loading it like this suppresses them (instead of just adding ggplot2 to depends)
  # wrapping in tryCatch to avoid error when it's already attached
  tryCatch(
    {
      suppressPackageStartupMessages(attachNamespace("ggplot2"))
      packageStartupMessage("Loading required package: ggplot2")
    },
    error = function(e) invisible()
  )
}

Try the ggsurvfit package in your browser

Any scripts or data that you put into this service are public.

ggsurvfit documentation built on Nov. 2, 2023, 5:33 p.m.