nwords: Number of words

View source: R/nwords.R

nwordsR Documentation

Number of words

Description

Counts and returns the number of words in each element of a character vector.

Usage

nwords(x)

Value

Number of words in a string

Examples

# Number of words
phrases <- c("Words", "Two words", "This is four words.")
nwords(phrases)

cfree14/freeR documentation built on Aug. 22, 2023, 11:12 p.m.