You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
MartinHinz
changed the title
chron_data verursacht Duplikate, die so nicht in der Datenbank sind
chron_data causes duplicates that are not in the database
May 29, 2024
While working on #7, I realised that this is due to the way references are currently parsed. For this PR, I left the result as it was, but we should consider whether this behaviour is intentional!
IIRC the aim was to provide a completely flat table from chron_data(), so in that sense having one row per reference (long format) makes sense. I'm quite fond of nested data frames myself, e.g. holding references in a list of vectors, but I think returning that kind of thing in a package isn't a good idea because many people aren't used to working with them.
Longer term, my preference would be for reworking the architecture of this package so it has individual functions that more closely match XRONOS 'v2' API and return classed vectors that can be used to build up multi-stage queries (e.g. xr_get_c14s(...) |> xr_get_references()), rather than one monolithic function. It is difficult to robustly reduce a complex data structure like XRONOS' to a single flat table, both on the server and client side.
Try the following standard query from the API page:
chron_data(labnr = "AAR-1847")
The result is currently 7 observations, but there are only (at least) 4 duplicates in the database. They also come out correctly via API:
The duplicates are created during processing.
The text was updated successfully, but these errors were encountered: