backports (version 1.1.4)

capture.output: Backport of capture.output for R < 3.3.0

Description

Argument type has been backported. See the original description in utils::capture.output.

Usage

capture.output(..., file = NULL, append = FALSE, type = c("output",
  "message"), split = FALSE)

Arguments

Examples

Run this code
# NOT RUN {
# get function from namespace instead of possibly getting
# implementation shipped with recent R versions:
bp_capture.output <- getFromNamespace("capture.output", "backports")

captured <- bp_capture.output({ message("hi") }, type = "message")
str(captured)
# }

Run the code above in your browser using DataCamp Workspace