{
# the row numbers are returned to identify which observations have repeated
# values
library(dplyr)
get_duplicated_rows(tbl = bind_rows( tbl = mtcars, mtcars[1,]))
get_duplicated_rows(
tbl = bind_rows(mtcars,mtcars[1,]) %>%
add_index() %>%
mutate(index = paste0('obs_',index)),
id_col = 'index')
}
Run the code above in your browser using DataLab