add_quotes_if_has_spaces {beastier}R Documentation

Add quotes around the string if it contains spaces.

Description

Add quotes around the string if it contains spaces. Does nothing if the string contains no spaces. This is used for filenames

Usage

add_quotes_if_has_spaces(filename)

Arguments

filename

a filename

Value

a filename. If the filename did not contain spaces, it is returned as-is. If the filename did contain spaces, the filename is surrounded by quotes

Author(s)

Richèl J.C. Bilderbeek

Examples

add_quotes_if_has_spaces("x")
add_quotes_if_has_spaces("a b")

[Package beastier version 2.4.8 Index]