.printf | R Documentation |
Wrapper for sprintf, doesn't convert NA to character
.printf(pattern, ...)
pattern |
A pattern to use with sprintf |
... |
Extra arguments for sprintf |
Returns the character vector resulting from applying sprintf to "pattern" for each of the arguments in ..., but with NA arguments remaining NA instead of being used to fill the placeholders in "pattern".
.printf("HELLO %s", c("WORLD", NA))
# Compare with sprintf:
sprintf("HELLO %s", c("WORLD", NA))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.