[datatable-help] A new package multitable (data.list) remind me of a long existing feature request #202 and discussion thread

Branson Owen branson.owen at gmail.com
Sun Oct 2 09:14:30 CEST 2011


Hello Matthew,

2011/10/2 Matthew Dowle <mdowle at mdowle.plus.com>
>
>  On Thu, 2011-09-29 at 13:33 -0500, Branson Owen wrote:
> > "Many data sets do not easily fit into a single data frame, such as
> > inherently multiple-table data (e.g. fourth-corner problem and other
> > trait-based data sets). Storing such data in a single data frame
> > results in either large numbers of meaningless missing values or
> > storage of redundant information. The multitable package introduces
> > new data storage objects called data.lists, which are extensions of
> > data.frames. As data.lists can be coerced to data.frames, they can be
> > used with all R functions that accept an object that is coercible to a
> > data.frame (e.g. lm; plot; lme; and many more). The multitable package
> > also provides several mechanisms for simplifying the manipulation of
> > data.list objects."
> > [data.list] http://cran.r-project.org/web/packages/multitable/index.html
>
> I read through the vignette, looks very interesting.
>
> > [Feature Request
> > #202]
> https://r-forge.r-project.org/tracker/index.php?func=detail&aid=202&group_id=240&atid=978
> > [Discussion]
> >
> http://r.789695.n4.nabble.com/Suggest-a-cool-feature-Use-data-table-like-a-sorted-indexed-data-list-td2544213.html
>
> I thought that thread was largely solved. v1.5.2 came after that (I
> think) which made grouping work on list() columns. #202 was then changed
> to be just 'matrix as columns'. You can already have any sized matrix
> (or data.table, or anything) as an element in a data.table (as an
> element of a list() column). Not sure if that helps at all. multitable
> seems to be about combining together a database of tables into one
> object (i.e. different)?
>
>
Oh, sorry, I was testing the syntax like:

DT = data.table(A = 1:2, B = list('a', 2i))

It didn't work, and I though this feature has not been implemented. Thank
you for pointing it out with a good example.



> > DT = data.table(a=1:3)
> > DT$obj
> = list(matrix(1:3,3),data.table(letters[1:4],1:4),data.table(letters[1:2],1:6))
> > setkey(DT,a)
> > DT[J(3),obj,mult="first"]   # keyed data.list?
> [[1]]
>     V1 V2
> [1,]  a  1
> [2,]  b  2
> [3,]  a  3
> [4,]  b  4
> [5,]  a  5
> [6,]  b  6
>
> > I don't know whether the multitable's author is aware of data.table.
> > I will write to make suggestions to the multitable author:
> > at least, I think it should be an easy change for him to make
> > data.list an extension of data.table instead of data.frame, and will
> > make multitable package directly inherit data.table's power. Any
> > thoughts before I approach Steve? or it would be better to let
> > data.table team raise this idea to him? :)
>
> That would be great if you could approach. Thanks. Would be great to
> leverage the synergies.
>

Sure thing, no problem. I will approach Steve tomorrow with interesting
ideas, and let you what he thought if he replies.

Best regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20111002/0fe763dc/attachment.htm>


More information about the datatable-help mailing list