fakeLines | R Documentation |
Returns randomized input as if reading lines from a file, like 'readLines()' Can be used to test i/o functions, robustness.
fakeLines( max.lines = 10, max.chars = 100, pc.space = 0.35, delim = " ", can.null = TRUE )
max.lines |
maxmimum number of fake lines to read |
max.chars |
maximum number of characters per line |
pc.space |
percentage of randomly generated characters that should be a delimiter |
delim |
what should the simulated delimiter be, e.g, a space, comma etc. If you wish not to include such either set the delimiter as "", or set pc.space=0. |
can.null |
whether with probability 1/max.lines to return NULL instead of any lines of text, which simulates an empty file, which for testing purposes you may want to be able to handle |
a vector of character entries up 'max.chars' long, or sometimes only NULL if can.null=TRUE
Nicholas Cooper
fakeLines() # should produce between zero and ten lines of random text, 35% of which are spaces
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.