str_rm_short_words {textTools}R Documentation

Remove words from a vector that don't have a minimum number of characters.

Description

Remove words from a vector that don't have a minimum number of characters.

Usage

str_rm_short_words(x, min_char_length)

Arguments

x

A vector of words.

min_char_length

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

Value

x, with the words not having a character count greater than or equal to the min_char_length removed.

Examples

str_rm_short_words(
x = c("a", "dog", "went", "to", "the", "store"),
min_char_length = 3
)

[Package textTools version 0.1.0 Index]