Ditto: Removes duplicated data values downstream

View source: R/fill.r

DittoR Documentation

Removes duplicated data values downstream

Description

Replaces duplicated values with "ditto" string

Usage

Ditto(x, ditto="")

Arguments

x

Vector, possibly with missing values

ditto

String to replace with, typically empty string "" (default)

Details

If the first argument is not a character vector, Ditto() converts it to the character.

Value

Vector with replaced values

Author(s)

Alexey Shipunov

See Also

Fill

Examples

Ditto(c("a", "a", "", "b", "b"))
Ditto(c("a", "a", "", "b", NA, "b"))
Ditto(c("a", "a", "", "b", NA, "b"), ditto=NA)
Ditto(c("a", "a", "", "b", NA, "b"), ditto="--")

shipunov documentation built on Feb. 16, 2023, 9:05 p.m.

Related to Ditto in shipunov...