num_words: Number of Words

Description Usage Arguments Examples

View source: R/clickbait_functions.R

Description

This function takes in any string and returns the number of words it has. This function is intended for use on any of the clickbait MEA datasets.

Usage

1

Arguments

text

string/ headline

Examples

1
2
3
4
## Not run: 
headlines_words <- headlines %>% mutate(num_words = num_words(title))

## End(Not run)

leahannejohnson/textclassificationexamples documentation built on Feb. 7, 2022, 11:04 p.m.