printString: Print string

Description Usage Arguments Details Value Note See Also Examples

View source: R/printString.R

Description

Capture print() output as a character string.

Usage

1
printString(x, ..., max = getOption("max.print", 100L))

Arguments

x

An object used to select a print() method.

...

Passthrough arguments to print().

max

integer(1). Maximum length of vector. Works internally by calling head() on the print capture, prior to collapse using paste(). Supports getOption("max.print") global variable.

Details

Useful for returning informative messages inside a function.

Value

character(1).

Note

Updated 2021-02-23.

See Also

cat().

Examples

1
2
printString(c("hello", "world"))
printString(datasets::mtcars, max = 2L)

acidgenomics/AcidBase documentation built on Sept. 10, 2021, 1:27 a.m.