| sub-.interval_index | R Documentation |
Read indexing returns interval_index subsets while preserving interval/key
order; out-of-order selectors are canonicalized with a warning. Replacement
indexing is blocked.
## S3 method for class 'interval_index'
x[i, ...]
## S3 method for class 'interval_index'
x[[i, ...]]
## S3 replacement method for class 'interval_index'
x[i] <- value
## S3 replacement method for class 'interval_index'
x[[i]] <- value
## S3 method for class 'interval_index'
x$name
## S3 replacement method for class 'interval_index'
x$name <- value
x |
An |
i |
Index input. |
... |
Unused. |
value |
Replacement value (unsupported). |
name |
Element name (for |
Read indexing preserves canonical interval order in returned subsets.
Integer/character vectors are treated as selectors and canonicalized to interval-order output.
Out-of-order selector vectors trigger a warning and are canonicalized.
Duplicate selectors are rejected.
[[ and $ return payload values.
Replacement indexing ([<-, [[<-, $<-) is unsupported.
Read methods return interval payload values/subsets; replacement forms always error.
For $: the matched payload element.
No return value; always errors because replacement indexing is unsupported.
ix <- interval_index(a = "A", b = "B", c = "C", start = c(1, 3, 5), end = c(2, 4, 6))
ix[c(3, 1)] # warning; result returned in interval order
ix[c("c", "a")] # warning; result returned in interval order
ix[c(TRUE, FALSE, TRUE)]
ix[["b"]]
ix$b
try(ix[c(2, 2)])
try(ix$b <- "updated")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.