RExpression NA converts to string "nil", not value nil
When RExpression exports an NA value, it gets converted to the string "nil", not the actual nil value. See attached workflow.
#2 Updated by ben leinfelder about 12 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)
#3 Updated by Oliver Soong about 12 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.