babble | R Documentation |
The babbler uses its own internal PRNG (i.e., not R's), so seeds cannot be managed as with R's seeds. The generator is an implementation of MT19937.
At this time, we note that the seed may not guarantee the same results across machines. Currently only Solaris produces different values from mainstream platforms (Windows, Mac, Linux, FreeBSD), but potentially others could as well.
babble(ng, genlen = 150, seed = getseed())
## S4 method for signature 'ngram'
babble(ng, genlen = 150, seed = getseed())
ng |
An ngram object. |
genlen |
Generated length, i.e., the number of words to babble. |
seed |
Seed for the random number generator. |
A markov chain babbler.
ngram
, getseed
library(ngram)
str = "A B A C A B B"
ng = ngram(str)
babble(ng, genlen=5, seed=1234)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.