qcv: Quick Character Vector

View source: R/qcv.R

qcvR Documentation

Quick Character Vector

Description

Create a character vector without the use of quotation marks.

Usage

qcv(
  ...,
  terms = NULL,
  space.wrap = FALSE,
  trailing = FALSE,
  leading = FALSE,
  split = " ",
  rm.blank = TRUE
)

Arguments

terms

An optional argument to present the terms as one long character string. This is useful if the split (separator) is not a comma (e.g., spaces are the term separators).

space.wrap

logical. If TRUE wraps the vector of terms with a leading/trailing space.

trailing

logical. If TRUE wraps the vector of terms with a trailing space.

leading

logical. If TRUE wraps the vector of terms with a leading space.

split

Character vector of length one to use for splitting (i.e., the separator used in the vector). For use with the argument terms.

rm.blank

logical. If TRUE removes all blank spaces from the vector.

...

Character objects. Either ... or terms argument must be utilized.

Value

Returns a character vector.

See Also

c

Examples

## Not run: 
qcv(I, like, dogs)
qcv(terms = "I, like, dogs") #default separator is " "
qcv(terms = "I, like, dogs", split = ",")
qcv(terms = "I  like dogs")
qcv(I, like, dogs, space.wrap = TRUE)
qcv(I, like, dogs, trailing = TRUE)
qcv(I, like, dogs, leading = TRUE)
exclude(Top25Words, qcv(the, of, and))
qcv(terms = "mpg cyl  disp  hp drat    wt  qsec vs am gear carb")

## End(Not run)

qdap documentation built on May 31, 2023, 5:20 p.m.

Related to qcv in qdap...