powered by
Replaces duplicated values with "ditto" string
Ditto(x, ditto="")
Vector, possibly with missing values
String to replace with, typically empty string "" (default)
Vector with replaced values
If the first argument is not a character vector, Ditto() converts it to the character.
Fill
# NOT RUN { 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