replaceVariables: Replace 'rmake' variables in a character vector

Description Usage Arguments Value Author(s) See Also Examples

View source: R/replaceVariables.R

Description

This function searches for all rmake variables in given vector x and replaces them with their values that are defined in the vars argument. The rmake variable is a identified by the $[VARIABLE_NAME] string.

Usage

1

Arguments

x

A character vector where to replace the rmake variables

vars

A named character vector with variable definitions (names are variable names, values are variable values)

Value

A character vector with rmake variables replaced with their values

Author(s)

Michal Burda

See Also

expandTemplate()

Examples

1
2
vars <- c(SIZE='small', METHOD='abc')
replaceVariables('result-$[SIZE]-$[METHOD].csv', vars)   # returns 'result-small-abc.csv'

rmake documentation built on May 1, 2019, 10:37 p.m.