Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calculate items do not store logical values #428

Open
jmgirard opened this issue Oct 17, 2019 · 4 comments
Open

Calculate items do not store logical values #428

jmgirard opened this issue Oct 17, 2019 · 4 comments

Comments

@jmgirard
Copy link

jmgirard commented Oct 17, 2019

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

@jmgirard
Copy link
Author

jmgirard commented Oct 17, 2019

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
image

Input
image

Output
image

Note the missing values for the two FALSE items. They aren't NA, just missing entirely.

@cyriltata
Copy link
Collaborator

cyriltata commented Oct 18, 2019 via email

@jmgirard
Copy link
Author

Sounds good. Thank you!

@rubenarslan
Copy link
Owner

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants