RExpression actor can get typing wrong for incoming numeric vector /array on first workflow run
If the sink ports receiving data from an R actor are not compatible with the token type (using isCompatible), the R actor sets the sink port type to the token type. This is a workaround for what seems to be the automatic typing system not setting port types properly on the first few runs of a workflow. This works pretty well, but there is a subtle problem that can still occur, on the first run of a workflow, with numeric vectors:
Since, for example, sink port type: arrayType(string) is compatible with token type: arrayType(double,132), on the first run of such a workflow a numeric vector comes into a sink R actor with all its values in quotes, and when you do numeric comparisons with these, the quotes will give you problems , eg, "250.25" > 2000. On the second run of the workflow the typing is right, and so you're comparing numbers as you expect, eg 250.25 < 2000.
I have changed from isCompatible to isEquals for when to change a sink port type and things seem to work on first runs. I will test it on a few more workflows before checking it it.