sqlsubst {surveyNG}R Documentation

Substitute variables into a text string

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

sqlsubst(strings, values)

Arguments

strings Vector of character strings
values A list of vectors of values to substitute

Value

Substituted vector of strings

Examples

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

[Package surveyNG version 0.3 Index]