Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

RStringVector I/O of NULL values should be consistent with R vectors #7

@swells

Description

@swells

When we pass a RStringVector from the client with all NULL values we get incorrect and inconsistent results:

  1. R console output produces boolean/logical True - incorrect
  2. Return type in the calling client is RDataNA which is not a vector with NULL values - incorrect

Results should be consistent with R, for example:

> x <- c(NULL, NULL, NULL, NULL)
> x
NULL

> y <- c(NULL, NULL, "foo", NULL)
> y
[1] "foo"

Reproduce:

List<String> v = new ArrayList<String>();
v.add(null);
v.add(null);
v.add(null);
v.add(null);
RDataFactory.createStringVector("x", v);

List<String> v = new ArrayList<String>();
v.add(null);
v.add(null);
v.add("foo");
v.add(null);
RDataFactory.createStringVector("y", v);

View response. It should be consistent with R vectors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions