Learn R Programming

reproducibleRchunks (version 1.2.0)

escapedQuote: Escape quotes for shell commands

Description

This helper prepares character vectors for use in shell commands by quoting them with shQuote() and (double) escaping any internal double quotes.

Usage

escapedQuote(x, double = FALSE)

Value

A character vector with all double quotes double escaped so that it can safely be passed to a command line call.

Arguments

x

A character vector that may contain double quotes.

double

Boolean. Should the quotes be escaped twice? Default: FALSE

Examples

Run this code
if (FALSE) {
escapedQuote('foo "bar" baz')
}

Run the code above in your browser using DataLab