Skip to content
This repository has been archived by the owner on Nov 21, 2020. It is now read-only.

ROutputParser is parsing NA as 0 #26

Open
gb5256 opened this issue Dec 15, 2016 · 1 comment
Open

ROutputParser is parsing NA as 0 #26

gb5256 opened this issue Dec 15, 2016 · 1 comment

Comments

@gb5256
Copy link

gb5256 commented Dec 15, 2016

Hi,
please check this function:

public function singleNumber($output)
{
    //TODO properly check if r output is a valid number
    return 0 + substr($output, 4);
}

The problem is that if the return from R is like this:
[0] NA
the script will return "0".
But 0 is something else than NA, right?

gb5256

@gb5256 gb5256 changed the title Small Bug? ROutputParser is parsing NA as 0 Dec 15, 2016
@kachkaev
Copy link
Owner

Yeah, it should probably return null in this case. Could you please submit a PR?

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

No branches or pull requests

2 participants