[datatable-help] Generating data.tables from a j function
Farrel Buchinsky
fjbuch at gmail.com
Fri Oct 20 20:14:11 CEST 2017
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?
For instance, I sometimes use the package dtables to generate descriptive
statistics. It generates a table for
So one could go
library(dtables)
dtable(dt)
But what if one wanted to get descriptive statistics by a trichotomous
variable
dt[ , dtable(.SD), by=trichotomous.variable]
*I am looking for a general article or blogpost about how to handle outputs
that are not single numbers or two numbers. *There are functions that yield
data.tables or lists or specialized objects such a models. Any suggestions?
I know one can simply print the output to the console
dt[ , print(dtable(.SD)_, by=trichotomous.variable]
But that does not let me do anything intelligent afterwards.
--
Farrel Buchinsky
(412) 567-7870 (gets me everywhere)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20171020/0e7315bd/attachment.html>
More information about the datatable-help
mailing list