cat2cat
Handling an Inconsistently Coded Categorical Variable in a Longitudinal Dataset
Description
Unifying an inconsistently coded categorical variable between two different time points in accordance with a mapping table. The main rule is to replicate the observation if it could be assigned to a few categories. Then using frequencies or statistical methods to approximate the probabilities of being assigned to each of them. This procedure was invented and implemented in the paper by 'Nasinski', 'Majchrowska', and 'Broniatowska' (2020) <doi:10.24425/cejeme.2020.134747>.
Downloads
550
Last 30 days
6865th
1.2K
Last 90 days
3.6K
Last year
Trend: +37.5% (30d vs prior 30d)
12
Last 30 days
76
Last 90 days
211
Last year
Trend: -60% (30d vs prior 30d)
14
Last 7 days
43
Last 30 days
3
All-time
autoCRAN-only: this name is served only by autoCRAN, so the count is exact.
CRAN Check Status
Show all 13 flavors
| Flavor | Status |
|---|---|
| r-devel-linux-x86_64-debian-clang | OK |
| r-devel-linux-x86_64-debian-gcc | OK |
| r-devel-linux-x86_64-fedora-clang | OK |
| r-devel-linux-x86_64-fedora-gcc | OK |
| r-devel-windows-x86_64 | OK |
| r-oldrel-macos-arm64 | OK |
| r-oldrel-macos-x86_64 | OK |
| r-oldrel-windows-x86_64 | OK |
| r-patched-linux-x86_64 | OK |
| r-release-linux-x86_64 | OK |
| r-release-macos-arm64 | OK |
| r-release-macos-x86_64 | OK |
| r-release-windows-x86_64 | OK |
Check History
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 8, 2026
examples
Running examples in ‘cat2cat-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: summary_c2c
> ### Title: Adjusted summary for regressions on replicated datasets
> ### Aliases: summar
...[truncated]...
", sprintf("Please install %s package to use the %s model in the cat2cat function.", :
Please install caret package to use the knn model in the cat2cat function.
Calls: cat2cat -> cat2cat_ml -> validate_ml -> delayed_package_load
Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE May 3, 2026
tests
Running 'testthat.R' [118s] Running the tests in 'tests/testthat.R' failed. Complete output: > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional tes ...[truncated]... 9. └─base::data.frame(...) 10. ├─base::as.data.frame(x[[i]], optional = TRUE) 11. └─base::as.data.frame.integer(x[[i]], optional = TRUE) [ FAIL 3 | WARN 0 | SKIP 0 | PASS 105 ] Error: ! Test failures. Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
Code
Structure
Lines of code
7,718
Files
74
Compiled share
0%
Has compiled src
No
Language breakdown
API
Exported functions
11
Internal functions
12
Recent export changes
Testing & CI
Has tests
Yes
Test-to-code ratio
1.03
testthat edition
3
CI present
No
CI type
[]
PR gated
No
Docs
Return-value doc rate
100%
\dontrun example ratio
33.3%
Roxygen coverage
100%
Has pkgdown
No
NEWS present
Yes
Health & Security signals
Informational signals; not verdicts.
on.exit coverage
100%
Unsafe pattern score
0
Dep constraint coverage
0%
Secret pattern count
0
Bundled 3rd-party code
2 items
Portability & License
Min R version
3.6
System requirements
–
C++ standard
–
License
GPL (>= 2) | file LICENSE
License flags
SPDX valid, not OSI
History
Versions
13
First release
2020-09-22
Latest release
2026-05-17
Avg cadence
79 days
Cold removal rate
100%
Dep drift
11
LOC over versions
Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.