R/print.R

Defines functions print.mbart2 print.mbart print.lbart print.pbart print.wbart

#' @export
print.wbart <- function(x, ...) {
  cmps <- paste0("\t$", names(x), collapse = "\n")
  cat("\nBART::wbart with", length(x$yhat.train.mean), "samples\n")
  cat("components:\n", cmps)
}

#' @export
print.pbart <- function(x, ...) {
  cmps <- paste0("\t$", names(x), collapse = "\n")
  cat("\nBART::pbart with", length(x$yhat.train.mean), "samples\n")
  cat("components:\n", cmps)
}

#' @export
print.lbart <- function(x, ...) {
  cmps <- paste0("\t$", names(x), collapse = "\n")
  cat("\nBART:lbart with", length(x$yhat.train.mean), "samples\n")
  cat("components:\n", cmps)
}

#' @export
print.mbart <- function(x, ...) {
  cmps <- paste0("\t$", names(x), collapse = "\n")
  cat("\nBART::mbart with", length(x$yhat.train.mean), "samples\n")
  cat("components:\n", cmps)
}

#' @export
print.mbart2 <- function(x, ...) {
  cmps <- paste0("\t$", names(x), collapse = "\n")
  cat("\nBART::mbart2 with", length(x$yhat.train.mean), "samples\n")
  cat("components:\n", cmps)
}

Try the tidytreatment package in your browser

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

tidytreatment documentation built on March 18, 2022, 6:30 p.m.