Closed johan-ejstrud closed 4 months ago
Hi, cool that you are working on pxmake!
I dont think there is a use case for having different numbers for each language :-) , so PxWeb seems to use the last value.
With this input to pxweb, PRECISION [sv]("gendersv","F")=2; PRECISION("gender","F")=3; I get this when I as to px-file PRECISION[sv]("gendersv","F")=3; which I think is good.
The keypart needs language because of the text. So its not fair to say language independent either :-)
Finland has this nice page: https://github.com/PxTools/Px.Utils/blob/dev/docs/PXFILE_SPECIFICATION.md
Thank you @JohannesFinsveen
Good point about the language being needed for the text. 👍 I now know how I need to implement it.
And thanks for the link. I have been lurking on PxTools, but not spotted that document. I'll have a look. :)
Question
In the Px-file specification it says that the keyword PRECISION is language dependent. Is that really the case?
I tried creating a small example where I have different PRECISION for the two languages in the file. However, switching languages doesn't seem to change the number of decimals in neither PxEdit or PxWeb.
Example
File: precision_test.txt
![image](https://github.com/statisticssweden/PxWeb/assets/11992346/ef4b65ef-eba1-48ee-a819-c7b9ebed671e)
Background
I'm asking because I'm working on a package to create px files in R. I had originally implemented PRECISION as language independent, but then stumbeled upon this in the specification.