View source: R/20-api-generics.R
| insert | R Documentation |
Inserts an element into a structure-specific position according to class semantics.
insert(x, ...)
x |
Object to insert into. |
... |
Method-specific arguments. |
insert() is an S3 generic. Required arguments in ... depend on x:
priority_queue: element, priority (optional name)
ordered_sequence: element, key (optional name)
interval_index: element, start, end (optional name)
This operation is persistent: x is not modified.
Updated object of the same class as x.
priority_queue(), ordered_sequence(), interval_index(),
insert_at()
q <- priority_queue("a", "b", priorities = c(2, 1))
insert(q, "c", priority = 3)
o <- ordered_sequence("a", "c", keys = c(1, 3))
insert(o, "b", key = 2)
iv <- interval_index("A", "B", start = c(1, 5), end = c(3, 8))
insert(iv, "C", start = 2, end = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.