String representation of a character vector for SQLite consumption

Share:

Description

Transform a character vector (e.g. c("a", "b") into a string representation that can be used in a SQLite query (e.g. "('a', 'b')").

Usage

1
strVectorSQLRepr(vec, print_out = FALSE, single_quote = TRUE)

Arguments

vec

character.

print_out

logical. Print out the string representation when set to TRUE.

single_quote

logical. Whether to use single quote for each element. Use double quote if set to FALSE. Default to TRUE.

Author(s)

Kaiyin Zhong

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.