Skip to content

Preserve numeric columns in migrants preliminary simulations - #41

Merged
MarsicoFL merged 1 commit into
MarsicoFL:mainfrom
chenyangsu:fix/migrants-prelim-column-types
Nov 28, 2026
Merged

MarsicoFL merged 1 commit into
MarsicoFL:mainfrom
chenyangsu:fix/migrants-prelim-column-types

Conversation

@chenyangsu

Copy link
Copy Markdown
Contributor

sim_poi_prelim(casetype = "migrants", numsims = 100, seed = 456) and sim_mp_prelim(casetype = "migrants") return UHR-ID, Age, and Height as character columns because cbind(a, age, c, height, e) forms a character matrix. sim_lr_prelim("age", int = 5, MP = 9, database = db) then compares ages lexicographically, giving 0 matches instead of 12 and capping LR at 1e6 instead of 7.9167.

Both branches now call data.frame(..., check.names = FALSE, stringsAsFactors = FALSE). Happy to cast UHR-ID to integer if you prefer.

Testing: testthat::test_local(".", filter = "sim-prelim-types|vs-legacy-nongenetic|nongenetic-feature|r-ref-nongenetic|threshold-rates|fragility") -> 272 passed, 0 failed, 1 skipped (9 failures on main).

@MarsicoFL
MarsicoFL merged commit c11bc23 into MarsicoFL:main Nov 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants