<div>
<div>Since you have the data as well, why not provide it (a small part at least with which your issue is reproducible)? Isn't it much easier than to ask everyone who's willing to help to create a data and test your code?</div><div></div>
</div>
<div><div><br></div><div>Arun</div><div><br></div></div>
<p style="color: #A0A0A8;">On Monday, June 17, 2013 at 8:54 AM, Ivan Alves wrote:</p>
<blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;">
<span><div><div><div>Dear all,</div><div><br></div><div>I am not sure I understand the syntax for merging data.tables. I have keyed the two 'satelite' tables from which I want to match information to the main table 'links'</div><div><br></div><div> g_ctpty <- gultimate[,list(ctpty_head,ctpty_cty)]</div><div> setkey(g_ctpty,ctpty_head)</div><div> g_iss <- gultimate[,list(iss_head,iss_cty)]</div><div> setkey(g_iss,iss_head)</div><div><br></div><div>Why are the two below not equivalent?</div><div><br></div><div>This works:</div><div><br></div><div> data = merge(</div><div> merge(links, g_ctpty, all.x = TRUE, by = "ctpty_head"),</div><div> g_iss,</div><div> all.x = TRUE, by = "iss_head"</div><div> ),</div><div><br></div><div>And this does not:</div><div><br></div><div> data = g_iss[g_ctpty[links]],</div><div><br></div><div>Any guidance would be appreciated.</div><div>Kind regards,</div><div>Ivan</div><div>_______________________________________________</div><div>datatable-help mailing list</div><div><a href="mailto:datatable-help@lists.r-forge.r-project.org">datatable-help@lists.r-forge.r-project.org</a></div><div><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help</a></div></div></div></span>
</blockquote>
<div>
<br>
</div>