[datatable-help] Report an unexpected behavior in data.table 1.5
Branson Owen
branson.owen at gmail.com
Tue Aug 31 15:40:21 CEST 2010
Dear all,
I just updated my data.table package from 1.4 to 1.5 yesterday. Ran
into a small problem that has been solved. Just want to report it
since I don't quite understand it.
> DT[eval(parse(text = criteria))]
This command is working in 1.4, but not everywhere in 1.5. It show
this error message when called within a function.
Error in `[.data.table`(Data, eval(parse(text = criteria))) :
i has not evaluated to logical, integer or double
However, it works in global environment? My solution for a function
call is, again, wrap it with {}. Therefore,
> DT[ { eval(parse(text = criteria)) } ]
solved my new problem.
It didn't behave like this in 1.4. I guess this is because of the
favor Matthew did for me for the DT[ { CJ } ] bug. If nothing can be
perfect, I pretty much like the current setup. There wasn't many
eval(), but there are lots of CJ/J in my codes.
Just thought you will be interested. Thank you very much for your
efforts and great work.
Best regards,
More information about the datatable-help
mailing list