assign {cppcontainers}R Documentation

Replace all elements

Description

Replace all elements in a container by reference.

Usage

assign(x, value, pos, envir, inherits, immediate)

Arguments

x

A CppVector, CppDeque, CppForwardList, or CppList object.

value

A vector. It is called value instead of values for compliance with the generic base::assign method.

pos

Ignored.

envir

Ignored.

inherits

Ignored.

immediate

Ignored.

Details

Replaces all elements in x with the elements in value.

The parameters pos, envir, inherits, and immediate are only included for compatibility with the generic base::assign method and have no effect.

Value

Invisibly returns NULL.

See Also

emplace, emplace_after, emplace_back, emplace_front, insert, insert_after, insert_or_assign.

Examples

v <- cpp_vector(4:9)
v
# 4 5 6 7 8 9

assign(v, 12:14)
v
# 12 13 14


[Package cppcontainers version 1.0.0 Index]