%s$% {stringi} | R Documentation |
Provides access to base R's sprintf
in form of a binary
operator in a way similar to Python's %
overloaded for strings.
e1 %s$% e2 e1 %stri$% e2
e1 |
a single format string, see |
e2 |
a list of arguments to be passed to |
Vectorized over e2
.
e1 %s$% atomic_vector
is equivalent to
e1 %s$% list(atomic_vector)
.
Returns a character vector.
"value='%d'" %s$% 3 "value='%d'" %s$% 1:3 "%s='%d'" %s$% list("value", 3) "%s='%d'" %s$% list("value", 1:3) "%s='%d'" %s$% list(c("a", "b", "c"), 1) "%s='%d'" %s$% list(c("a", "b", "c"), 1:3)