This function is a variant of the sprintf function. In the query, can be placed identifier tags which are a hash character followed by a number e.g. #1 The number in the tag reflects the position of the arguments after the query The resut of evaluating that argument will then be inserted in place of the tag. If the result of evaluating the argument is a vector of length 1, it is inserted as is. If it is a vector of length > 1, it is wrapped in parentheses and comma separated.
a character string with identifier tags (#[number]) for selecting the argument in ...
optional arguments selected by the identifier tags
Note that this function is for help in constructing raw SQL queries and should not be used as an
input to the
where argument in
This is because these calls use translate_sql_q to translate from R code to SQL
1 2 3 4
medcodes1 <- 1:5 practice <- 255 wrap_sql_query("eventdate >= STARTDATE & eventdate <= ENDDATE & medcode %in% #1 & practice == #2", medcodes1, practice)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.