R/print.dataInfo.R

Defines functions print.dataInfo

Documented in print.dataInfo

#' Print method of the dataInfo object
#'
#' This function provides a customized print method for objects created by the 'dataInfo()' function. 
#' It displays each element of the data information list in a user-friendly format.
#'
#' @param x A list of data information from the 'dataInfo' function.
#' @param ... Dots are for compatibility and not used.
#' @return The function returns the kable object invisibly from the 'dataInfo()' function, allowing for its use in further function calls or 
#'         command chaining without printing the object again.
#' @export
#' @rdname print.dataInfo
print.dataInfo <- function(x, ...) {
  for (el in 1:length(x)) {
    cat(names(x)[el], ":", x[[el]], "\n")
  }
  invisible(x) # Return the object invisibly
}

Try the esmtools package in your browser

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

esmtools documentation built on May 29, 2024, 6:45 a.m.