tests/testthat/test-clean_colnames.R

cleaned <- clean_colnames(c(".title...", "X..YEAR",
                         "authors..", ".AUTHOR"))

expect(!any(grepl("[[:punct::]]", cleaned)), "Punctuation not removed from names")

expect(!any(duplicated(cleaned)), "Duplicated names not cleaned")

expect(!any(grepl("^(X|Y|Z)\\.+", cleaned)), "Leading X not removed from names")

Try the synthesisr package in your browser

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

synthesisr documentation built on July 2, 2020, 2:16 a.m.