powered by
Insert values at a position
insert(x, positions, values)
A vector with the intended values inserted
A vector of values
Integer of positions of x to insert values
x
values
A vector of values to insert into x
insert(letters[1:5], c(2, 4), c("X", "Y"))
Run the code above in your browser using DataLab