Description Usage Arguments Details Value Examples
Checks if all values in a column are the same, works for any type of data
1 | repeating_column(x, roundx = NULL)
|
x |
Vector of values |
roundx |
Only use if data is numeric, rounds the calculated variance if a value is given |
Be careful using the roundx
argument. e.g. repeating_column(c(1, 1, 1.0001), roundx = 8) will
return TRUE.
Logical
1 2 3 4 5 6 7 8 | repeating_column(rep(1, 5))
repeating_column(c("dog", "dog", "dog", "cat"))
# Use with purrr to test multiple columns
testdf <- data.frame(x = rep(1, 5), y = c(1, 2, 1, 1, 1))
purrr::map_lgl(testdf, ~ repeating_column(.))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.