strintrplt:
Performs string interpolation with arbitrary R code.
Description
This function allows a character vector to have arbitrary R code embedded within it. The embedded R code --- placed between @{ and } --- is evaluated by default in the environment from which this function is called (not defined). Any number of instances of embedded R code is possible. The result of the function is a character vector in which the embedded R code is replaced by character representations of the results of evaluating the embedded R code.
Usage
strintrplt(snippet,envir=parent.frame())
Arguments
snippet
A character vector of length one which may contain multiple @{RCODE} substrings which will be replaced by a character representation of the result of evaluating RCODE. This character vector may contain many R statements and span multiple lines.
envir
The environment in which to evaluate the embedded R code.