Skip to contents

Calculate average word length in a string

Usage

avg_word_len(text)

Arguments

text

A character vector for the average word length extraction.

Value

A numeric vector representing the average word length in the text.

Examples

x <- "Here are some words"
avg_word_len(x)
#> [1] 4
4
#> [1] 4