na_rle_shift: Shift run length encoding <'NA'>

Description Usage Arguments Examples

View source: R/funs-na-rle.R

Description

Shift run length encoding <NA>

Usage

1
na_rle_shift(x, n = 1L)

Arguments

x

An object returned by na_rle() or list_of_na_rle().

n

An integer shifts the position. If positive, shifts to the right, otherwise to the left.

Examples

1
2
3
(x <- na_rle(c(1, NA, NA, 4:7, NA, NA, 10:15, NA)))
na_rle_shift(x, n = 2)
na_rle_shift(x, n = -5)

earowang/mists documentation built on Sept. 21, 2019, 1:12 p.m.