# NOT RUN {
text <- c("Hello $(name)!", "$(a) + $(b) = @{$(a) + $(b)}",
"pi = @{format(pi, digits = 5)}")
replacement <- list(name = "world", a = 1, b = 2)
cat(ReplaceInTemplate(text, replacement), sep = "\n")
# }
Run the code above in your browser using DataLab