sqlsubst: Substitute variables into a text string

Description Usage Arguments Value Examples

Description

When the string contains a name bracketed on both signs by %%, substitute the element of values with the same name. If the element of values is a vector then concatenate with comma separators first.

Usage

1
sqlsubst(strings, values)

Arguments

strings

Vector of character strings

values

A list of vectors of values to substitute

Value

Substituted vector of strings

Examples

1
2
sqlsubst("get %%vars%% from %%table%%",
     list(vars=c("name","age","sex"), table="survey_data"))

sqlsurvey documentation built on May 2, 2019, 4:53 p.m.