Using the CSV input always defaults to 2 decimal variable
When trying to use the following:
readstat <input file.csv> <input metadata.json> <output file>
I define my NUMERIC variable with the property "decimals": 0 however ReadStat simply ignores anything I put in that property and just defaults to 2 decimals.
I also have the same problem.
What is your output format? SAV, DTA, etc
SAV in my case.
Any ideas, @ivarref?
A Simple Example
csv data file:
Q,customized
1,1.2345678
meta json:
{
"type": "SPSS",
"variables": [
{
"decimals": 5,
"label": "customized",
"name": "customized",
"type": "NUMERIC"
},
{
"categories": [
{
"code": 1,
"label": "male"
},
{
"code": 2,
"label": "female"
}
],
"decimals": 0,
"label": "Q",
"name": "Q",
"type": "NUMERIC"
}
]
in spss
The decimals value of both variables is 2.

Hi, I don't have good idea. I'm away from my job until end of October, maybe I can investigate further then.
I do remember doing some extra fixes (3 commits) that never went into WizardMac:master: https://github.com/ivarref/ReadStat
Particularly using jasmine strict mode to avoid some JSON boundary parsing errors: https://github.com/ivarref/ReadStat/commit/b3d44c08618d86ce9523193c95a16b0564e9d9a4
Could that be relevant?
Regards.
Edit: JSON boundary parsing errors, not CSV.