renjin icon indicating copy to clipboard operation
renjin copied to clipboard

Renjin as an R package does not support logical return value

Open daslu opened this issue 5 years ago • 0 comments

The following R session shows that numeric return values convert back to R numerics, but logical do not.

BTW, thank you for this brilliant library!

> library(renjin)
Jul 02, 2019 9:55:49 PM org.apache.commons.vfs2.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
> renjin({1+2})
[1] 3
> renjin({1==2})
java.lang.UnsupportedOperationException: TODO: Unwrap org.renjin.sexp.LogicalArrayVector
	at org.renjin.embed.Wrapper.unwrap(Wrapper.java:288)
	at org.renjin.embed.Renjin.eval(Renjin.java:111)
Error in renjin({ : object 'result' not found
> sessionInfo()
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04 LTS

Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=en_IL          LC_NUMERIC=C            LC_TIME=en_IL          
 [4] LC_COLLATE=en_IL        LC_MONETARY=en_IL       LC_MESSAGES=en_IL      
 [7] LC_PAPER=en_IL          LC_NAME=en_IL           LC_ADDRESS=en_IL       
[10] LC_TELEPHONE=en_IL      LC_MEASUREMENT=en_IL    LC_IDENTIFICATION=en_IL

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] renjin_0.9.2726

loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4    rJava_0.9-11  
> 

daslu avatar Jul 02 '19 18:07 daslu