R/print.quantiles_report.R

Defines functions print.quantiles_report

Documented in print.quantiles_report

#' A custom print method for the 'quantiles_report' class
#'
#' @param x A data frame of the class 'quantiles_report'.
#' @param ... Other argument that can be passed to 'print'.
#'
#' @return The function displays the content of the column 'report'
#' in separate lines.
#'
#' @examples
#' \donttest{
#' if (FALSE) {
#' library(phdcocktail)
#' summary_data <- report_quantiles(mtcars, summary_vrs = "mpg")
#' print(summary_data)
#'   }
#' }
#'
#' @export
print.quantiles_report <- function(x, ...) {
  cat(x$report, sep = "\n") # Print the report column
}

Try the phdcocktail package in your browser

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

phdcocktail documentation built on May 29, 2024, 7:12 a.m.