powered by
Inserting values in a vector at specific index locations
insertvec(v, ind, val)
new vector with val inserted after the index
vector
ndex locations where val is inserted
some vector of insertion, maybe NA
Jonathan M. Lees<jonathan.lees@unc.edu>
The vector is parsed out and val values are inserted where after the index values provided.
x = 1:20 insertvec(x, c(4,17) , NA)
Run the code above in your browser using DataLab