R/output_class_simfun.R

#' @import methods
#' @noRd
# Define the class for the output list of sim_function function
## Source: https://stackoverflow.com/a/15046810


methods::setClass("simfun_output", representation("list"))

# Define the custom show method
methods::setMethod("show", "simfun_output", function(object) {
  cat("Output for the sim_function function", "\n")
  cat("===================================", "\n")
  cat("The empirical p-value is ", object$empirical_percentage , "\n")
  cat("\n")  # Print double dashed line
})

Try the Largevars package in your browser

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

Largevars documentation built on June 8, 2025, 11:18 a.m.