shipunov (version 1.5)

Ditto: 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)

Value

Vector with replaced values

See Also

Fill

Examples

Run this code
# NOT RUN {
Ditto(c("a", "a", "", "b", "b"))
Ditto(c("a", "a", "", "b", NA, "b"))
Ditto(c("a", "a", "", "b", NA, "b"), ditto=NA)
# }

Run the code above in your browser using DataCamp Workspace