powered by
This is useful when assembling functions calls, where you specify parameter names and character values at the same time.
add_quotes(x, except = NULL, single_quote = TRUE, collapse = NULL)
List or named vector
Vector specifying the names of the elements that should not be enquoted.
Use single quotes (') instead of double quotes ("). Default is TRUE.
If not NULL, collapse the values into a single vector using this value as the separator. Default is NULL.
The list or named vector, with additional quotes around the appropriate values
# NOT RUN { params = list(a = TRUE, b = FALSE, c = 'ABC', d = 15) add_quotes(params) add_quotes(params, except = 'c') # }
Run the code above in your browser using DataLab