<p dir="ltr">I already know that. I usually struggle when using data.table inside my own packages. I start by listing it in imports only (and not importing anything) but end up depending on it, as for the users to be able to manipulate the data.tables with [ and :=. I end up importing some or all of data.table also, because I don't know how to call := the :: notation. <br>
My specific problem was on using := during on.Load. I already know how to use it, and know that it can only be used inside [.<br>
Maybe it is imperative to @import data.table to be able to use :=? </p>
<br><div class="gmail_quote">On Mon, Jan 19, 2015, 19:35 Arunkumar Srinivasan <<a href="mailto:aragorn168b@gmail.com">aragorn168b@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Within the square brackets in "DT[ .... ]" and even there, only in `j` (as the error message points out).</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 19, 2015 at 11:31 PM, Juan Manuel Truppia <span dir="ltr"><<a href="mailto:jmtruppia@gmail.com" target="_blank">jmtruppia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Arun, what does "within the frame of data.table" mean? </p><div><div>
<br><div class="gmail_quote">On Mon, Jan 19, 2015, 19:17 Arunkumar Srinivasan <<a href="mailto:aragorn168b@gmail.com" target="_blank">aragorn168b@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Juan,<div><br></div><div>`:=` is designed to be used only within the frame of data.table. </div></div><div class="gmail_extra"><br><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Jan 19, 2015 at 10:45 PM, Juan Manuel Truppia <span dir="ltr"><<a href="mailto:jmtruppia@gmail.com" target="_blank">jmtruppia@gmail.com</a>></span> wrote:<br></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, I'm using data.table inside my own packages. I'm having some trouble using data.table functions on my .onLoad method.<div>I'm actually depending (not importing) data.table, but even then, I can't get := to work in .onLoad.</div><div>I'm using the `:=`(a = x, b = y) version, and getting</div><div><br></div><div>Error in `:=`(a = x) :</div><div>Check that is.data.table(DT) == TRUE. Otherwise, := and `:=`(...) are defined for use in j, once only and in particular ways. See help(":=").</div><div><br></div><div>If I comment that, and then run it from the console after the package is loaded, it works.</div><div><br></div><div>Any ideas?</div>
<br></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br>
datatable-help mailing list<br>
<a href="mailto:datatable-help@lists.r-forge.r-project.org" target="_blank">datatable-help@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a><br></blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>