powered by
Inserting NA values in a vector at specific index locations
insertNA(y, ind)
new vector with NA's
vector
index locations where NA is inserted
Jonathan M. Lees<jonathan.lees@unc.edu>
The vector is parsed out and NA values are inserted where after the index values provided.
x = 1:10 insertNA(x, 6)
Run the code above in your browser using DataLab