albertosantini / node-rio

Integration with Rserve, a TCP/IP server for R framework
https://github.com/albertosantini/node-conpa
MIT License
176 stars 35 forks source link

Type __ is currently not implemented #41

Closed Holayn closed 6 years ago

Holayn commented 6 years ago

Hi, I was wondering why the following command evaluation results in a 'Type 16 is currently not implemented' error.

n = c(2, 3, 5)
s = c("aa", "bb", "cc", "dd", "ee")
b = c(TRUE, FALSE, TRUE, FALSE, FALSE)
x = list(n, s, b, 3)

Cheers

albertosantini commented 6 years ago

Thanks for the feedback.

I suppose because it is a list.

From the README: It supports double, double array, integer, integer array, string, string array, boolean, boolean array objects and raw vector (images or files).

albertosantini commented 6 years ago

If you need to pass a "complex" object (in or out) from Rserve, you need to serialize it (to a string).

See, for instance, the second example in examples folder.

When I investigated supporting native list type, the complexity of the implementation was not so simple and it seems was not so useful for my use cases.

I close the issue like won't fix. Feel free to contribute if you need to support list native type.