make_mistake | R Documentation |
As Brian is rather poor at Latin, he will make random spelling errors when on his mission.
make_mistake(string) pick_position(string, positions)
string |
string to make errors in |
positions |
number of positions to do typos at; taken from |
These are internal functions used by goBrian
.
make_mistake
returns a slogan
with spelling error(s) introduced.
pick_position
returns an integer vector.
make_mistake
: At the moment only does substitutions; removing or adding characters is not supported.
All mistakes are in lowercase at the moment.
pick_position
: Randomly picks positions where mistakes will be made.
It runs recursively until all picked positions correspond to letters.
The first letter will always be correct.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.