Container

A container can be considered a base R list with extended functionality.

Container

Container Class

container() cont() as.container() as.cont() is.container() as.list(<Container>) length(<Container>) names(<Container>) `names<-`(<Container>)

Container - Enhancing R's list

clear() ref_clear()

Clear a Container

clone()

Clone an Object

container_options() getContainerOption()

Set Container Package Options

unpack()

Unpack Nested Objects

add or replace

add() ref_add()

Add Elements to Containers

replace() ref_replace()

Replace Values in Containers Safely

replace_at() ref_replace_at()

Replace Values at Indices Safely

`[<-`(<Container>) `[[<-`(<Container>) `$<-`(<Container>)

Replace Parts of a Container

extract

at()

Extract Elements Safely

at2()

Extract Single Elements Safely

peek_at()

Peek at Indices

peek_at2()

Peek at Single Index

`[`(<Container>) `[[`(<Container>)

Extract Parts of a Container Object

inspect

count()

Count Elements

has()

Check for Element

has_name()

Check for Name

is_empty()

Check if Object is Empty

remove

delete() ref_delete()

Delete Container Elements Safely

delete_at() ref_delete_at()

Delete Elements at Indices Safely

discard() ref_discard()

Discard Container Elements

discard_at() ref_discard_at()

Discard Elements at Indices

ref_pop() ref_popleft()

Get and Remove Element

update

rename() ref_rename()

Rename Elements Safely

ref_update() update(<Container>) update(<dict.table>) update(<list>)

Update Object with Elements from Another Object

Deque

Derives all Container methods. Can also be used to mimic stacks or simple queues.

Deque

Deque Class

deque() as.deque() is.deque()

Deque - Double-Ended Queue

addleft() ref_addleft()

Add Elements to the Left of Deques

peekleft() peek()

Peek at Left or Right of a Deque

ref_rev() rev(<Deque>)

Reverse Elements

rotate() ref_rotate()

Rotate Elements

Set, OrderedSet

Derives all Container methods. Set elements are always unique.

Set

Set Class

OrderedSet

OrderedSet Class

setnew() as.set() as.orderedset() is.set() is.orderedset()

Set and ordered Set

Dict

Derives all Container methods. All Dict elements must be named and are always sorted by their name.

Dict

Dict Class

dict() as.dict() is.dict()

A Dictionary

dict.table

The dict.table is a mix of a dict and a data.table and derives all data.table and most of the dict/container methods.

dict.table() as.dict.table() is.dict.table() rbind(<dict.table>) cbind(<dict.table>)

Combining Dict and data.table

Iterator

Iterate over sequences.

Iterable

Iterable abstract class interface

Iterator

Iterator Class

iter() is.iterator() is.iterable() begin() get_value() get_next() has_next() has_value() pos() next_iter() reset_iter() length(<Iterator>)

Iterate over Sequences

Operators

`+`(<Container>) `-`(<Container>) `+`(<Deque>) `-`(<Deque>) `+`(<Dict>) `-`(<Dict>) `+`(<Set>) `-`(<Set>)

Arithmetic Operators

`==`(<Container>) `!=`(<Container>) `<`(<Container>) `>`(<Container>) `<=`(<Container>) `>=`(<Container>)

Comparison Operators

`&`(<Dict>) `|`(<Dict>) `&`(<Set>) `|`(<Set>)

Logic Operators

Depecated

Deprecated functions.

empty() size() sortkey() values() keys()

Deprecated Functions