Bug #4318
closedRExpression NA converts to string "nil", not value nil
0%
Description
When RExpression exports an NA value, it gets converted to the string "nil", not the actual nil value. See attached workflow.
Files
Updated by ben leinfelder over 15 years ago
I've changed to use StringToken.NIL when we encounter NA objects in R.
This is still different than Token.NIL. StringToken.NIL works with the attached workflow (as I assume you want it to) whereas Token.NIL actually shows as "niltype" and so neither condition is met.
I'm leaving it as StringToken.NIL for now (it's almost a negligible change this way - but still important)
Updated by Oliver Soong over 15 years ago
Ok, now I'm just getting confused again. How many different nils are there? Is there a simple way to robustly test for them (akin to R's is.null function)? Am I just not thinking of the reason why we want different types of NA values for different types of nil values?
By way of example, an R NA -> StringToken.NIL -> R "NA". On the other hand, a Ptolemy nil -> Token.NIL (?) -> R NA. But at the same time, Ptolemy nil -> Token.NIL (?) -> Ptolemy not-nil (so nil != nil).
I'm attaching a workflow to show of some of the perverseness. Part of it is my own fault (http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4267), but I plead ignorance.
Updated by Christopher Brooks over 15 years ago
BTW - the test case should probably be checked in and run
as part of the nightly build so that this bug stays fixed.
Is there documentation about how to add test cases to the test system?