print.sig: Print a sig object

Description Usage Arguments Value Examples

Description

Prints a function signature object.

Usage

1
2
3
4
5
6
7
## S3 method for class 'sig'
toString(x, width = getOption("width"),
  exdent = nchar(x$name), ...)

## S3 method for class 'sig'
print(x, width = getOption("width"), exdent = nchar(x$name),
  ...)

Arguments

x

An object of class sig.

width

Width of string to display.

exdent

Non-negative integer specifying the indentation of subsequent lines in the string.

...

Passed to toString

Value

toString creates a string representation of a function signature. print is mostly invoked for the side effect of printing a function signature, invisibly returning its input.

Examples

1
2
3
4
5
print_default_sig <- sig(print.default)
print(print_default_sig)
print(print_default_sig, width = 40)
print(print_default_sig, width = 40, exdent = 2)
toString(print_default_sig)

Example output

print.default <- function(x, digits = NULL, quote = TRUE, na.print = NULL,
             print.gap = NULL, right = FALSE, max = NULL, useSource = TRUE,
             ...)
print.default <- function(x, digits =
             NULL, quote = TRUE,
             na.print = NULL, print.gap
             = NULL, right = FALSE, max
             = NULL, useSource = TRUE,
             ...)
print.default <- function(x, digits =
  NULL, quote = TRUE, na.print = NULL,
  print.gap = NULL, right = FALSE, max
  = NULL, useSource = TRUE, ...)
[1] "print.default <- function(x, digits = NULL, quote = TRUE, na.print = NULL," 
[2] "             print.gap = NULL, right = FALSE, max = NULL, useSource = TRUE,"
[3] "             ...)"                                                          

sig documentation built on May 1, 2019, 8:45 p.m.