qcv: Quick Character Vector

Description Usage Arguments Value See Also Examples

View source: R/qcv.R

Description

Create a character vector without the use of quotation marks.

Usage

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## 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)

trinker/qdap documentation built on Sept. 30, 2020, 6:28 p.m.