wordcount: Count the number of words (strings separated by spaced) in a...

Description Usage Arguments Author(s) Examples

View source: R/wordcount.R

Description

Count the number of words (strings separated by spaced) in a sentence.

Usage

1
wordcount(sentence)

Arguments

sentence

Author(s)

Joost van de Weijer

Examples

1
2
3
4
5
6
7
8
9
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (sentence)
{
    sapply(strsplit(sentence, " +"), length)
  }

vdweijer/supply documentation built on June 28, 2021, 7:45 a.m.