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

Matthew Dowle mdowle at mdowle.plus.com
Tue Aug 31 19:41:04 CEST 2010


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
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help




More information about the datatable-help mailing list