Learn R Programming

dunlin (version 0.1.9)

safe_transformer: Safe transformer

Description

Safe transformer

Usage

safe_transformer(text, envir)

Value

string with substituted placeholders.

Arguments

text

(string) to be substituted.

envir

(environment) containing key-value pairs describing the substitution to perform.

Details

Obtain content in global environment by default. If not found, use the environment here. The function first looks for an exact match. If not found, it searches for a match in lower case then apply to the result the same case as the original value.