View source: R/rmSharedWords.R
rmSharedWords | R Documentation |
This function allows removing shared words, ie triming to non-redundant words.
rmSharedWords(
x,
sep = c("_", " ", "."),
anySep = TRUE,
newSep = NULL,
minLe = 2,
na.omit = FALSE,
fixed = TRUE,
silent = FALSE,
debug = FALSE,
callFrom = NULL
)
x |
(character) main input for making non-redundant |
sep |
(character) separator(s) to be used |
anySep |
(logical) if |
newSep |
(character) new (uniform) separator between words, if |
minLe |
(integer) minimum length for allowing being recognised as 'word' |
na.omit |
(logical) if |
fixed |
(logical) will be transmitted to argument |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allows easier tracking of messages produced |
Heading separators will be removed in any case (even if not followed by a 'word').
Special characters will be automatically protected. When looking for repeated words, the order of such words does NOT matter, multiple repeats will be removed, too.
#'
This function returns character vector of same length (unless na.omit=TRUE
), simply with modified text-content
trimRedundText
x1 <- c("aa_A1 yy_zz.txt", NA, "B2 yy_aa_aa_zz.txt")
rmSharedWords(x1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.