symengine.R icon indicating copy to clipboard operation
symengine.R copied to clipboard

support for NA

Open elfunesto opened this issue 5 years ago • 2 comments

Thank you very much for this great package. Currently, I have not seen any way to deal with NA and get a "Can not parse NA_real_". It would be great to have a way to deal with this. Regards

elfunesto avatar Jan 07 '20 14:01 elfunesto

One way to do it is to convert R's NA to SymEngine's NaN (i.e. S(NaN)). However I think NA and NaN in R have different semantics. NA means missing and does not have a good mapping in SymEngine. I would suggest you convert NA to NaN and then pass it to SymEngine's parser.

Marlin-Na avatar Jan 07 '20 15:01 Marlin-Na

Thank you for your answer, it fulfils my need!

elfunesto avatar Jan 07 '20 15:01 elfunesto