Description Usage Arguments Value Examples
View source: R/display_tables.R
This function replaces duplicated values in a column by the empty string so that the table output is easier to read.
The removal is done by comparing the vector with a shifted (lagged) version of itself.
By default this function will convert numeric ouptut to character variables,
unless you change the default empty_value=''
argument.
1 | replace_repeated_by_empty_string(x, empty_value = "")
|
x |
a vector |
empty_value |
the default values used for the lag, should be different than the first value in x |
vector
1 2 3 | replace_repeated_by_empty_string(c("bla","bla","bli", "bli"))
replace_repeated_by_empty_string(c(1,2,3))
replace_repeated_by_empty_string(c(0,0,0,1,2,2,3,3,3))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.