qw: Create a vector from unquoted words.

View source: R/aaa.R

qwR Documentation

Create a vector from unquoted words.

Description

Similar to perl's qw(), however, in R spaces between args in function call always cause an error, so ⁠qw(foo bar)⁠ wouldn't work. Workaround is either a single string split at spaces, or unquoted elements, separated by commas.

Usage

qw(x)

qc(...)

Arguments

x

A single string of elements to be split at whitespace chars.

...

Unquoted words, separated by comma.

Details

Took inspiration from stackoverflow/qw and github/Jarrett Byrnes

Value

A vector of quoted words.

Examples

qw("foo bar") # with a strsplit
qc(foo, bar) # or unquoted, but with commas

gggenomes documentation built on Nov. 14, 2025, 5:07 p.m.