Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

print_and_capture

Print a variable and capture the output


Description

Prints a variable and captures the output, collapsing the value to a single string.

Usage

print_and_capture(x, ...)

Arguments

x

A variable.

...

Arguments passed to print methods.

Value

A string.

See Also

Examples

# This is useful for including data frames in warnings or errors
message("This is the sleep dataset:\n", print_and_capture(sleep))

assertive.base

A Lightweight Core of the 'assertive' Package

v0.0-9
GPL (>= 3)
Authors
Richard Cotton [aut, cre], Sunkyu Choi [trl], Ivanka Skakun [trl], Gergely Dar<c3><b3>czi [trl], Anton Antonov [trl], Hisham Ben Hamidane [trl], Anja Billing [trl], Aditya Bhagwat [trl], Rasmus B<c3><a5><c3><a5>th [trl], Mine Cetinkaya-Rundel [trl], Aspasia Chatziefthymiou [trl]
Initial release
2021-02-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.