[datatable-help] i = !x different from i = (!x)

Stavros Macrakis (Σταῦρος Μακράκης) macrakis at alum.mit.edu
Mon Jun 30 18:06:41 CEST 2014


DT 1.9.2

t1 <- data.table(a=1:2,b=0:1,key="a")

t1[b==0] => row 1, OK
t1[!b] => ERROR "object 'b' not found" ??
t1[(!b)] => row 1, OK

Shouldn't !b be equivalent to (!b)? They are both expressions, not symbols.

         -s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140630/22d00cc8/attachment.html>


More information about the datatable-help mailing list