unfill: Remove repeated values in vector

Description Usage Value Examples

View source: R/misc.R

Description

Repeated values are replaced by NA. This is useful for formatting tables for papers.

Usage

1
unfill(x)

Value

Vector with repeated values replaced by NA

Examples

1
2
3
4
5
6
x <- c("A","A","A","B","B","C","C")
unfill(x)
## Not run: 
mutate(df, across(c("division", "class"), ~ unfill(.x)))

## End(Not run)

vaulot/dvutils documentation built on Nov. 20, 2021, 11:01 a.m.