R/verify_identifier_uniqueness.R

Defines functions verify_identifier_uniqueness

verify_identifier_uniqueness <- function(x, dfName, colName) {

  if (any(duplicated(x))) {
    stop("When sanitizing and verifying the identifiers in data frame / ",
         "worksheet '", dfName, "', I found that not ",
         "all identifiers (i.e., values in column '",
         colName, "') were unique. Specifically, ",
         vecTxtQ(x[duplicated(x)]), " occurred twice or more.");
  }

  return(x);

}

Try the preregr package in your browser

Any scripts or data that you put into this service are public.

preregr documentation built on May 31, 2023, 7:10 p.m.