insertvec | R Documentation |
Inserting values in a vector at specific index locations
insertvec(v, ind, val)
v |
vector |
ind |
ndex locations where val is inserted |
val |
some vector of insertion, maybe NA |
The vector is parsed out and val values are inserted where after the index values provided.
v |
new vector with val inserted after the index |
Jonathan M. Lees<jonathan.lees@unc.edu>
x = 1:20
insertvec(x, c(4,17) , NA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.