R/print_and_capture.R

Defines functions print_and_capture

Documented in print_and_capture

#' Capture the output of printing an object
#'
#' @param x printable object
#'
#' @return string representation of the provided object
#'
#' @examples
#'
#' OlinkAnalyze:::print_and_capture(npx_data1)
#'
print_and_capture <- function(x)
{
  paste(utils::capture.output(print(x)), collapse = "\n")
}

Try the OlinkAnalyze package in your browser

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

OlinkAnalyze documentation built on Nov. 4, 2023, 1:07 a.m.