insert | R Documentation |
This function inserts values into a vector, lengthening the overall vector. It is different from, say, x[1:3] <- c('a', 'b', 'c')
which simply replaces the values at indices 1 through 3.
insert(x, into, at, warn = TRUE)
x |
Vector of numeric, integer, character, or other values of the class of |
into |
Vector of values into which to insert |
at |
Vector of positions (indices) where |
warn |
If |
Vector.
insertCol
, insertRow
x <- -1:-3
into <- 10:20
at <- c(1, 3, 14)
insert(x, into, at)
insert(-1, into, at)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.