Learn R Programming

qdap (version 2.4.6)

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
)

Value

Returns a character vector.

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.

See Also

Examples

Run this code
if (FALSE) {
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