transform.filename | R Documentation |
Tool to templatize filenames. Useful when needing a ressource that depends on the local configuration
## S3 method for class 'filename'
transform(fn, subs = base.sub.list)
replace.variables(fn, subs = base.sub.list)
fn |
Template filename |
subs |
named list that associates template variable and their values |
The names in subs are regex patterns. Any matching regex patterns will be replaced by the value. To avoid replacing parts of words it is advised to start the template variable by a character that is not found in the string to replace. '$ replace.variables is an alias.
transform.filename("$wd/$dperl/my.script.$scnum.pl", c("$wd" = ".", "$dperl" = "perl", "$scnum" = "10"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.