Ditto | R Documentation |
Replaces duplicated values with "ditto" string
Ditto(x, ditto="")
x |
Vector, possibly with missing values |
ditto |
String to replace with, typically empty string "" (default) |
If the first argument is not a character vector, Ditto() converts it to the character.
Vector with replaced values
Alexey Shipunov
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="--")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.