strformat: Format a string

Description Usage Arguments Details Value Examples

View source: R/common.R

Description

This function adds formatting information to a character string by storing this information as the character string's attributes. Run the example to see how it works.

Usage

1

Arguments

s

character string to be formatted

...

formatting specifiers to be forwarded to gpar()

Details

All formatting specifiers work as if gpar() would be called. (It is, behind the screen.)

Value

formatted string

Examples

1
2
s <- strformat("Hello, World", fontsize=18, col="red")
str(s)  # show object structure

PantaRhei documentation built on Dec. 18, 2020, 5:08 p.m.