<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Not at the moment because of the checks. If it's a call, and the first index value is `!`, it's removed and then the rest is checked if it's a "name", which is true for `t1[!b]`. And i by default searches the calling scope - because `i` can be a data.table. That is, `X[!Y]` is intended to be used for `Y` being a data.table. Hence the difference between `X[!Y]` and `X[(!Y)]` at the moment.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">But in 1.9.3, this'll get better: Have a look at <a href="https://github.com/Rdatatable/data.table/issues/697">https://github.com/Rdatatable/data.table/issues/697</a> and <a href="https://github.com/Rdatatable/data.table/issues/633">https://github.com/Rdatatable/data.table/issues/633</a></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div> <div id="bloop_sign_1404146777597035008" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">Arun</div></div> <div style="color:black"><br>From: <span style="color:black">Stavros Macrakis (Σταῦρος Μακράκης)</span> <a href="mailto:macrakis@alum.mit.edu">macrakis@alum.mit.edu</a><br>Reply: <span style="color:black">Stavros Macrakis (Σταῦρος Μακράκης)</span> <a href="mailto:macrakis@alum.mit.edu">macrakis@alum.mit.edu</a><br>Date: <span style="color:black">June 30, 2014 at 6:06:53 PM</span><br>To: <span style="color:black">datatable-help@r-forge.wu-wien.ac.at</span> <a href="mailto:datatable-help@r-forge.wu-wien.ac.at">datatable-help@r-forge.wu-wien.ac.at</a><br>Subject: <span style="color:black"> [datatable-help] i = !x different from i = (!x) <br></span></div><br> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>
<title></title>
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:#330000">DT
1.9.2</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:#330000">
<br></div>
<div class="gmail_default" style="font-size:small;color:rgb(51,0,0)"><font face="courier new, monospace">t1 <-
data.table(a=1:2,b=0:1,key="a")</font></div>
<div class="gmail_default" style="font-size:small;color:rgb(51,0,0)"><font face="courier new, monospace"><br></font></div>
<div class="gmail_default" style="font-size:small;color:rgb(51,0,0)"><font face="courier new, monospace">t1[b==0] => row 1, OK</font></div>
<div class="gmail_default" style="font-size:small;color:rgb(51,0,0)"><font face="courier new, monospace">t1[!b] => ERROR "object 'b' not found"
??</font></div>
<div class="gmail_default" style="font-size:small;color:rgb(51,0,0)"><font face="courier new, monospace">t1[(!b)] => row 1, OK</font></div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:#330000">
<br></div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:#330000">Shouldn't
!b be equivalent to (!b)? They are both expressions, not
symbols.</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:#330000">
<br></div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:#330000">
-s</div>
</div>
_______________________________________________
<br>datatable-help mailing list
<br>datatable-help@lists.r-forge.r-project.org
<br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</div></div></span></blockquote></body></html>