powered by
Replace all elements in a container by reference.
assign(x, value, pos, envir, inherits, immediate)
Invisibly returns NULL.
NULL
A CppVector, CppDeque, CppForwardList, or CppList object.
A vector. It is called value instead of values for compliance with the generic base::assign method.
value
values
base::assign
Ignored.
Replaces all elements in x with the elements in value.
x
The parameters pos, envir, inherits, and immediate are only included for compatibility with the generic base::assign method and have no effect.
pos
envir
inherits
immediate
emplace, emplace_after, emplace_back, emplace_front, insert, insert_after, insert_or_assign.
v <- cpp_vector(4:9) v # 4 5 6 7 8 9 assign(v, 12:14) v # 12 13 14
Run the code above in your browser using DataLab