generated from pharmaverse/admiraltemplate
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
The numeric precision under the hood in the yyjson library is less than we'd like it to be, and in testing precision starts falling apart around 7 decimal places. The Dataset JSON standard has the "decimal" datatype available to allow users to intentionally handle floating point values. The package should support the ability to write and read these values.
This feature can be implemented as follows:
- Add option to
write_dataset_json()"floats_as_decimals" - Add additional option to control the specific number of digits to write
- Pull out all float variables from the columns tables
- Update the metadata for these variables to have
dataType=decimalandtargetDataType=decimalin line with guidance - Loop and rewrite all those columns as character using
format(x, digits=digits) - Add option to
read_dataset_json()"decimals_as_numeric" - On read, identify all decimal columns and convert using
as.numeric()
Metadata
Metadata
Assignees
Labels
No labels