Ha, I found the problem is caused by the special REvolution R 3.1.1
when I tried to re-produce the error. The underlying R is 2.9.2 which
is not allowed for data.table 1.5 (I rebuild the package to remove the
version restriction). Sorry, I didn't check it on standard R first
(Usually, I do.) An embarrassing mistake. :-P I know my working
environment is dangerous, and I will upgrade to their new version 4.0
soon, which is build on R-2.11.1. It was lucky that putting a {}
wrapper can solve my problem.Best regards, 2010/8/31 Matthew Dowle <[email protected]>: > I just have 30 seconds for quick reply ... can see I'll need > reproducible example for this one please; it will probably depend on > contents of 'criteria', columns of DT and arguments of the function > within which it fails. With that I can take a look later ... Thanks. > On Tue, 2010-08-31 at 08:40 -0500, Branson Owen wrote: >> 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, _______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
