formr.org
formr.org copied to clipboard
Calculate items do not store logical values
I am having trouble getting a calculate
type item to store logical values (i.e., TRUE or FALSE).
A minimum working example is here: https://docs.google.com/spreadsheets/d/14x1TtDJH0J2ivvuf7r7kK-9_ZdQd1ycyzk5kZ2TBp4g/edit?usp=sharing
The plot thickens. It seems that the issue is only with storing FALSE logicals, as TRUE values seem to be converted to 1's successfully:
Config
Input
Output
Note the missing values for the two FALSE items. They aren't NA
, just missing entirely.
Dear Jeffrey
Thanks for reporting the issue. We will resolve this in the next release. For the moment please could you use your workaround?
best Cyril
On Thu, Oct 17, 2019 at 11:32 PM Jeffrey Girard [email protected] wrote:
The plot thickens. It seems that the issue is only with storing FALSE logicals:
Config [image: image] https://user-images.githubusercontent.com/6829033/67049253-c8594400-f103-11e9-8bd4-6e3917f18c4f.png
Input [image: image] https://user-images.githubusercontent.com/6829033/67049380-15d5b100-f104-11e9-8cd2-44e5758667c1.png
Output [image: image] https://user-images.githubusercontent.com/6829033/67049221-b4addd80-f103-11e9-8236-75d540ca146d.png
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rubenarslan/formr.org/issues/428?email_source=notifications&email_token=AARL5Z5J3BXPW7S5Y4OVUH3QPDKX5A5CNFSM4JB6E4KKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBRS4XQ#issuecomment-543370846, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARL5Z4QIMWRAJB2BYJJOWTQPDKX5ANCNFSM4JB6E4KA .
Sounds good. Thank you!
To explain this a little, the calculate fields always store text. So all you ever get is a text representation of the value. But I think we're doing the conversion on the PHP side (where an empty string can denote false), when we should probably be doing it on the R side with as.character
to keep things consistent (in R an empty string is NA, not false).