phplyr

janitor

Verification

Scope

make_clean_names(), clean_names(), remove_empty(), get_dupes(), and one- and two-way tabyl(). Results compared with janitor's.

References

Reference
R 4.6.1 with janitor 2.2.1, dplyr 1.2.1
Versions
R 4.6.1, janitor 2.2.1, dplyr 1.2.1, PHP 8.5.10, phibble v0.8.0 (9e63ca5)

Data

Inline tables
Defined in tests/r/janitor.R and tests/JanitorTest.php.

Method

Reference results computed in R by tests/r/janitor.R and stored in tests/Fixtures/. The same operations run in phplyr in tests/JanitorTest.php, which compare every value. Values compared is the number of assertions in a case; a case fails if any assertion fails.

Check
Comparison with a reference implementation
Recorded
2026-11-02, PHP 8.5.10, macOS (arm64), commit 65e6a46

Tolerances

|x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1)

Applies to: Floating-point values

exact equality

Applies to: Column names, row counts and order, strings, integers, booleans, dates, and missing values

x: package value; r: reference value. Absolute error: |x − r|. Relative error: |x − r| / max(|r|, 1). Max errors are over the values a row compares.

Results

21 comparisons: 21 pass, 0 fail, 0 skipped.

Every comparison
Case Quantity Criterion Values Max abs. error Max rel. error Status
Matches janitor on names with case, punctuation, unicode, leading digits, and repeats Values exact equality 1 pass
rows and cols Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 13 0 0 pass
rows Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 16 0 0 pass
cols Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 21 0 0 pass
rows with a cutoff Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 6 0 0 pass
cols with a cutoff Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 16 0 0 pass
all columns Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 17 0 0 pass
one column Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 31 0 0 pass
two columns Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 21 0 0 pass
a numeric column Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 26 0 0 pass
characters with NA Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 21 4.4e-16 4.4e-16 pass
characters without NA Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 13 4.4e-16 4.4e-16 pass
numbers Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 21 4.4e-16 4.4e-16 pass
logicals Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 16 3.3e-16 3.3e-16 pass
a factor with an unused level Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 21 4.4e-16 4.4e-16 pass
a factor without unused levels Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 16 4.4e-16 4.4e-16 pass
an empty string Table values |x − r| ≤ 1e-9 + 1e-9 × max(|r|, 1) 13 4.4e-16 4.4e-16 pass
two ways Values exact equality 25 pass
two ways without NA Values exact equality 16 pass
two ways by a number Values exact equality 25 pass
two ways by factor and logical Values exact equality 21 pass

Limitations

Known differences

  • Without the intl extension, clean_names() transliterates with iconv, and some names differ from janitor's; the name check is then skipped.

Reproduction

From the repository root
Rscript tests/r/janitor.R
bin/site-verifications
Raw record
site/verifications/janitor.json
Input data
tests/Fixtures