dot-printf: Wrapper for sprintf, doesn't convert NA to character

.printfR Documentation

Wrapper for sprintf, doesn't convert NA to character

Description

Wrapper for sprintf, doesn't convert NA to character

Usage

.printf(pattern, ...)

Arguments

pattern

A pattern to use with sprintf

...

Extra arguments for sprintf

Value

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".

Examples

.printf("HELLO %s", c("WORLD", NA))

# Compare with sprintf:
sprintf("HELLO %s", c("WORLD", NA))

HelenLindsay/AbNames documentation built on June 6, 2023, 1:18 p.m.