Learn R Programming

cppcontainers (version 1.0.4)

remove.: Remove elements

Description

Remove elements from a container by reference.

Usage

remove.(x, value)

Value

Invisibly returns NULL.

Arguments

x

A CppForwardList or CppList object.

value

A value to delete from x.

Details

The method ends with a dot to avoid compatibility issues with the generic base::remove.

See Also

clear, empty, erase.

Examples

Run this code
l <- cpp_forward_list(4:6)
l
# 4 5 6

remove.(l, 5L)
l
# 4 6

Run the code above in your browser using DataLab