| splice | R Documentation |
Move elements from one list to another list by reference.
splice(x, y, x_position, y_from, y_to)
x |
A CppList object to which to add elements. |
y |
A CppList object, of the same data type as |
x_position |
Index at which to insert elements in |
y_from |
Index of the first element to extract from |
y_to |
Index of the last element to extract from |
Invisibly returns NULL.
merge, splice_after.
x <- cpp_list(4:9)
x
# 4 5 6 7 8 9
y <- cpp_list(10:12)
y
# 10 11 12
splice(x, y, 3, 2, 3)
x
# 4 5 11 12 6 7 8 9
y
# 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.