View source: R/ph_replacement.R
string_replace | R Documentation |
In a template text with placeholders, these placeholders are replaced with values that are specified via the list of replacement values. As a result the text is returned with the placeholders replaced by the values specified in the list of replacement values.
string_replace( ps_tmpl, pl_repl_value, ps_ph_open_tag = "<ph>", ps_ph_end_tag = "</ph>" )
ps_tmpl |
template text containing placeholders |
pl_repl_value |
list with replacement values |
ps_ph_open_tag |
open-tag for placeholder |
ps_ph_end_tag |
end-tag for placeholder |
Placeholders are words that are enclosed between an opening tag and an end tag. These tags can be specified as arguments ps_ph_open_tag and ps_ph_end_tag. The word between the tags corresponds to the name of the placeholder. This name is also used as a name in the list of replacement values. The value with which the placeholder is to be replaced is given as the list element associated with the name of the placeholder.
s_result where placeholders have been replaced with replacement values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.