String interpolation is a useful way of specifying a character string which
depends on values in a certain environment. It allows for string creation
which is easier to read and write when compared to using e.g.
paste
or sprintf
. The (template) string can
include expression placeholders of the form ${expression}
or
$[format]{expression}
, where expressions are valid R expressions that
can be evaluated in the given environment, and format
is a format
specification valid for use with sprintf
.
stringterpolate(string, env = parent.frame())
A template character string.
The environment in which to evaluate the expressions.
An interpolated character string.