Learn R Programming

sqlHelpers (version 0.1.2)

quoteText2: Add single quotes to strings using stringi::stri_join, useful for converting R strings into SQL formatted strings.

Description

Add single quotes to strings using stringi::stri_join, useful for converting R strings into SQL formatted strings.

Usage

quoteText2(x, char_only = TRUE, excluded_chars = c("NULL"))

Value

A string, with single quotes added to match SQL string formatting.

Arguments

x

A string.

char_only

TRUE/FALSE, if TRUE, adds quotes only if is.character(x) is TRUE.

excluded_chars

A character vector, will not add quotes if a value is in excluded_chars.

Examples

Run this code
quoteText2("Sample quotes.")

Run the code above in your browser using DataLab