jakutis / rserve-client

A stateful client for Rserve, the TCP/IP server for R framework.
https://www.npmjs.org/package/rserve-client
MIT License
10 stars 10 forks source link

Returning result set in the same dimension no matter how mamy rows ar… #4

Open ksobue opened 8 years ago

ksobue commented 8 years ago

Currently, the dimension of the result array is different between when R statement evaluates to 1 row and multiple rows. This is not useful when dealing with the result set programatically. For example, when the client program expects 3 dimension array as output, and one day the data set has updated and the same R statement evaluates to 1 row data set, then the output will be 2 dimension flattened array, and the program will fail to parse.

This pull request will remove the special handling for 1 row data set.

Thanks in advance!

jakutis commented 6 years ago

@ksobue to merge this I would need to also write tests and to also release a new major version due to API change near the removal of special handling for 1 row result.