1
0
mirror of https://github.com/msberends/AMR.git synced 2026-05-31 13:01:42 +02:00
Files
AMR/tests/testthat
Claude ba09fba08b Add coerce_reference_data_columns() for lenient reference_data validation
check_reference_data() now returns the (possibly coerced) reference_data and
the call site captures the result so downstream code sees the fixed columns.

A new coerce_reference_data_columns() helper is called before the strict class
check inside check_reference_data(). It coerces columns to the expected types:
- mo  -> as.mo() if not already <mo> class
- ab  -> as.ab() if not already <ab> class
- character columns -> as.character() (e.g. host = NA becomes NA_character_)
- numeric columns  -> as.double()
- logical columns  -> as.logical()

This allows users to build a custom reference_data from a plain data.frame
without having to pre-apply as.mo()/as.ab() or worry about NA column types.

Updated the reference_data roxygen argument to document the auto-coercion and
restored the tests to the simpler form that uses plain character assignments,
relying on the new coercion instead of workarounds.

https://claude.ai/code/session_01Q8KtFFGG9qrjAgLJBbxG2U
2026-04-25 12:09:22 +00:00
..
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2025-09-12 16:52:59 +02:00
2025-04-12 11:46:42 +02:00
2026-01-06 23:08:50 +01:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2026-03-07 18:07:24 +01:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2025-04-12 11:46:42 +02:00
2026-02-09 13:16:36 +01:00
2025-04-12 11:46:42 +02:00
2026-03-24 12:44:47 +01:00