Description Usage Arguments Examples
Set operations for run length encoding <NA
>
1 2 3 4 5 6 7 8 |
x, y |
Objects returned by |
... |
other arguments passed on to methods |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | (x <- na_rle(c(1, NA, NA, 4:7, NA, NA, 10:15, NA)))
(y <- na_rle(c(10, NA, NA, NA, 6:3, NA, 1)))
intersect(x, y)
union(x, y)
setdiff(x, y)
setdiff(y, x)
labels <- c("x", "y", "intersect(x, y)", "union(x, y)", "setdiff(x, y)",
"setdiff(y, x)")
labels <- factor(labels, levels = labels)
lst_na_rle <-
vctrs::as_list_of(
x, y,
intersect(x, y),
union(x, y),
setdiff(x, y),
setdiff(y, x)
)
autoplot(lst_na_rle, labels)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.