i_repeat | R Documentation |
Create an iterator that returns a value a specified number of times.
i_repeat(x, times)
x |
The value to return repeatedly. |
times |
The number of times to repeat the value. Default value is infinity. |
Originally from the itertools
package.
an iteror.
# Repeat a value 10 times
unlist(as.list(i_repeat(42, 10)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.