drake (version 6.2.1)

drake_quotes: Put quotes around each element of a character vector.

Description

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.

Usage

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

Run this code
# NOT RUN {
# Single-quote this string.
drake_quotes("abcd", single = TRUE) # "'abcd'"
# Double-quote this string.
drake_quotes("abcd") # "\"abcd\""
# }

Run the code above in your browser using DataLab