say: Nicer version of 'print()' or 'cat()' function

Description Usage Arguments Value See Also Examples

View source: R/say.r

Description

This function is a nicer version of print() or cat(), especially when used inline for functions because it displayes immediately and pastes all strings together. It also does some rudimentary but optional word wrapping.

Usage

1
2
say(..., pre = 0, post = 1, breaks = NULL, wiggle = 10,
  preBreak = 1, level = NULL, deco = "#")

Arguments

...

character strings to print

pre

Integer >= 0. Number of blank lines to print before strings

post

Integer >= 0. Number of blank lines to print after strings

breaks

Either NULL, which causes all strings to be printed on the same line (no wrap overflow) or a positive integer which wraps lines at this character length (e.g., breaks=80 inserts line breaks every 80 characters).

wiggle

Integer >- 0. Allows line to overrun breaks length in characters before inserting line breaks.

preBreak

If wrapping long lines indicates how subsequent lines are indented. NULL causes lines to be printed starting at column 1 on the display device. A positive integer inserts preBreak number of spaces before printing each line. A string causes each line to start with this string.

level

Integer or NULL. If NULL, then the items in ... are displayed as-is. Otherwise, a value of 1, 2, or 3 indicates teh heading level, with lower numbers causing more decoration and spacing to be used.

deco

Character. Character to decorate text with if level is not NULL.

Value

Nothing (side effect is outout on the display device).

See Also

[sayHead()]

Examples

1
2
3
4
5
say('The quick brown fox ', 'jumps over the lazy ', 'Susan.')
say('The quick brown fox ', 'jumps over the lazy ', 'Susan.', breaks=10)
say('The quick brown fox ', 'jumps over the lazy ', 'Susan.', level=1)
say('The quick brown fox ', 'jumps over the lazy ', 'Susan.', level=2)
say('The quick brown fox ', 'jumps over the lazy ', 'Susan.', level=3)

adamlilith/omnibus documentation built on Nov. 21, 2018, 11:01 a.m.