#without duplicate => no error, continue the pipeline
tibble(subjid=c(1:10)) %>% assert_no_duplicate() %>% nrow()
#with duplicate => throws an error
#tibble(subjid=c(1:10, 1:2)) %>% assert_no_duplicate() %>% nrow()
Run the code above in your browser using DataLab