<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">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><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>_______________________________________________<br>
datatable-help mailing list<br>
<a href="mailto:datatable-help@lists.r-forge.r-project.org">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>