[datatable-help] Report an unexpected behavior in data.table 1.5

Branson Owen branson.owen at gmail.com
Thu Sep 2 18:51:29 CEST 2010


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 <mdowle at mdowle.plus.com>:
> 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,


More information about the datatable-help mailing list