Description Usage Arguments Details Value Note Examples
Replace spaces in words groups that should be grouped together.
1 2 3 4 5 6 7 8 9 |
text.var |
The text variable. |
terms |
A character vector of grouped word terms to insert a new separating/space character. |
sep |
A character string to separate the terms. |
rm.extra |
logical. Should trailing, leading and > 1 continuous white spaces be removed? |
ignore.case |
logical. If |
fixed |
logical. If |
... |
Other arguments passed to |
space_fill
is useful for keeping grouped words
together. Many functions in qdap take a char.keep
or
char2space
argument. This can be used to prepare multi word phrases
(e.g., proper nouns) as a single unit.
Returns a character vector with extra, trailing and/or leading spaces removed.
link[qdap]{strip}
by default does not remove the double tilde
"~~"
character.
1 2 3 4 5 6 7 8 9 | ## Not run:
x <- c("I want to hear the Dr. Martin Luther King Jr. speech.",
"I also want to go to the white House to see President Obama speak.")
keeps <- c("Dr. Martin Luther King Jr.", "The White House", "President Obama")
space_fill(x, keeps)
strip(space_fill(x, keeps))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.