| splice_after | R Documentation |
Move elements from one forward list to another forward list by reference.
splice_after(x, y, x_position, y_from, y_to)
x |
A CppForwardList object to which to add elements. |
y |
A CppForwardList object, of the same data type as |
x_position |
Index after which to insert elements in |
y_from |
Index after which to extract elements from |
y_to |
Index of the last element to extract from |
Indices start at 1, which is also the minimum value permitted. Thus, the current implementation in this package does not allow to move the
first element of y.
Invisibly returns NULL.
merge, splice.
x <- cpp_forward_list(4:9)
x
# 4 5 6 7 8 9
y <- cpp_forward_list(10:12)
y
# 10 11 12
splice_after(x, y, 3, 1, 3)
x
# 4 5 6 11 12 7 8 9
y
# 10
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.