Learn R Programming

PantaRhei (version 0.1.2)

strformat: Format a string

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

strformat(s, ...)

Arguments

s

character string to be formatted

...

formatting specifiers to be forwarded to gpar()

Value

formatted string

Details

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

Examples

Run this code
# NOT RUN {
s <- strformat("Hello, World", fontsize=18, col="red")
str(s)  # show object structure
# }

Run the code above in your browser using DataLab