str_rm_words_by_length: Remove words from a vector based on the number of characters...

Description Usage Arguments Value Examples

View source: R/text.table.R

Description

Remove words from a vector based on the number of characters in each word.

Usage

1
str_rm_words_by_length(x, min_char_length = 0, max_char_length = Inf)

Arguments

x

A vector of words.

min_char_length,

An integer, the minimum number of characters a word can have to not be removed.

max_char_length,

An integer, the maximum number of characters a word can have to not be removed.

Value

x, with the words not having a character count of at least the min_char_length and at most the max_char_length removed.

Examples

1
2
3
4
str_rm_words_by_length(
x = c("a", "dog", "went", "to", "the", "store"),
min_char_length = 3
)

textTools documentation built on Feb. 5, 2021, 5:07 p.m.