<div dir="ltr">I am relatively certain that data.table can handle a function in the J position that generates a data.frame or a data.table. However, how does one handle the output? Can you please point me to a url that discusses the capability?<div><br></div><div>For instance, I sometimes use the package dtables to generate descriptive statistics. It generates a table for </div><div><br></div><div>So one could go</div><div><br></div><div>library(dtables)</div><div>dtable(dt)</div><div><br></div><div>But what if one wanted to get descriptive statistics by a trichotomous variable</div><div><br></div><div>dt[ , dtable(.SD), by=trichotomous.variable]</div><div><br></div><div><b>I am looking for a general article or blogpost about how to handle outputs that are not single numbers or two numbers. </b>There are functions that yield data.tables or lists or specialized objects such a models. Any suggestions?</div><div><br></div><div>I know one can simply print the output to the console</div><div><br></div><div>dt[ , print(dtable(.SD)_, by=trichotomous.variable]  <br></div><div><br></div><div>But that does not let me do anything intelligent afterwards. </div></div><div dir="ltr">-- <br></div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Farrel Buchinsky<div>(412) 567-7870 (gets me everywhere)</div></div></div>