Quotes are important in drake. In workflow plan data frame commands, single-quoted targets denote physical files, and double-quoted strings are treated as ordinary string literals.

drake_quotes(x = NULL, single = FALSE)

Arguments

x

character vector or object to be coerced to character.

single

Add single quotes if TRUE and double quotes otherwise.

Value

character vector with quotes around it

See also

drake_unquote(), drake_strings()

Examples

# Single-quote this string. drake_quotes("abcd", single = TRUE) # "'abcd'"
#> [1] "'abcd'"
# Double-quote this string. drake_quotes("abcd") # "\"abcd\""
#> [1] "\"abcd\""