Learn R Programming

qdap (version 2.2.1)

qcv: 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

Run this code
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")

Run the code above in your browser using DataLab