Learn R Programming

OpenRepGrid (version 0.1.16)

randomSentence: generate a random sentence with n words

Description

generate a random sentence with n words

Usage

randomSentence(n, maxchar = Inf)

Value

a string with n words (if length is not constrained)

Arguments

n

number of word in sentence

maxchar

maximal number of characters per sentence. Note that whole words (not part of words) are excluded if the maximal number is exceeded.

Examples

Run this code
randomSentence(10) # one random sentence with 10 words

Run the code above in your browser using DataLab