powered by
Replaces duplicated values with "ditto" string
Ditto(x, ditto="")
Vector with replaced values
Vector, possibly with missing values
String to replace with, typically empty string "" (default)
Alexey Shipunov
If the first argument is not a character vector, Ditto() converts it to the character.
Fill
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="--")
Run the code above in your browser using DataLab