| nstr | R Documentation |
Creates a vector of strings which consists of the string segment given in
each element of the string vector repeated times.
nstr(string, times)
string |
character: vector of string segments to be
repeated. Will be recycled if argument |
times |
integer: vector of number of times to repeat the
corisponding segment. Will be recycled if argument |
returns a character vector the same length as the longest of the two arguments.
Will throw a warning if the length of the longer argment is not a even multiple of the shorter argument.
Charles Dupont
paste, rep
nstr(c("a"), c(0,3,4))
nstr(c("a", "b", "c"), c(1,2,3))
nstr(c("a", "b", "c"), 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.