R/print.R

Defines functions format.srpmodel print.srpmodel

Documented in format.srpmodel print.srpmodel

#' Print an srpmodel
#'
#' @param x model to print
#' @template param-dotdotdot
#'
#' @return `format()` returns a character string representation of the object,
#' `print()` prints to the console and returns the object itself invisibly.
#'
#' @examples
#' print(create_srpmodel(A = define_srp_prior()))
#' @export
print.srpmodel <- function(x, ...) {
  cat(format(x, ...), "\n") # nocov
  return(invisible(x)) # nocov
}

#' @examples
#' format(create_srpmodel(A = define_srp_prior()))
#' @rdname print.srpmodel
#' @export
format.srpmodel <- function(x, ...) {
  sprintf("srpmodel<%s>", paste(x$group_id, collapse = ","))
}

Try the oncomsm package in your browser

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

oncomsm documentation built on April 17, 2023, 9:09 a.m.