Rdocumentation
powered by
Learn R Programming
datamart (version 0.3.2)
strsubst: Named substitution in strings
Description
Simple template mechanism inspired by PEP-0292. Use lists or named character vectors (vectors not tested) as a mapping for substitution.
Usage
strsubst(template, map, verbose = getOption("verbose"))
Arguments
template
character with $(VARS)
map
object with [ functionality e.g. a list. Should return values that can be coerced to character
verbose
print debugging messages when TRUE, default is getOption("verbose")
Value
character
Details
Substitutions are marked by $(NAME).
References
http://www.python.org/dev/peps/pep-0292/
http://stackoverflow.com/questions/8703398/conditional-gsub-replacement/8703832#8703832