inject | R Documentation |
Inject (insert) values at positions in a vector
inject(what, inWhat, at)
what |
The values to inject |
inWhat |
The vector in which to inject them |
at |
The positions in the vector *after* which to inject the values. |
A vector of same mode at 'inWhat', and of length equal to the sum of the lengths of 'what' and 'inWhat'.
inWhat <- 1:10
inject(c(21,22,23), inWhat, at=as.integer(c(0,5,10)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.