print.function: Print a function with syntax highlighting

View source: R/print.R

print.functionR Documentation

Print a function with syntax highlighting

Description

To turn on pretty printing of functions, you need to call prettycode::prettycode(). It might be a good idea to call it from your .Rprofile.

Usage

## S3 method for class ''function''
print(x, useSource = TRUE, style = default_style(), ...)

Arguments

x

Function to print.

useSource

Whether to use the stored source code, if available.

style

The highlight style to use, see default_style().

...

Not used currently, for compatibility with the print generic.

Value

The function, invisibly.


r-lib/prettycode documentation built on Nov. 10, 2023, 1:45 a.m.