[R] Indexing multi-dimensional table

David A Vavra davavra at verizon.net
Thu Dec 22 21:56:54 CET 2011


>From: William Dunlap [mailto:wdunlap at tibco.com] 
>You can build the 2nd argument to do.call with alist() instead.
>alist() produces a list that you can use c() and subscripting on
>to add or modify arguments.  It is usually better to encapsulate
>this sort of thing in a function like extract() that has a convenient
>interface.

Thanks. alist seems to produce empty list entries for missing arguments. It
wasn't clear to me how to generate one at run time. For example, how does
one append an empty list element? c(x,) produces "argument 2 is empty".
However I've discovered 

	c(alist(x,y),alist(),alist(z))

produces an empty entry between y and z. This will likely fit better in the
code I currently have. 

> Continuing the annoying tradition of partial quotes

A matter of taste, I guess. Speaking strictly for myself, I am annoyed by
needless repetition (particularly of mostly irrelevant matter such as
output, signature tags, subject name, to/from lines and quotes of quotes of
quotes) not to mention the tedium of such in a long reply stream making it
hard sometimes to locate the relevant replies. Omitting the things I've
listed perforce means a partial quote.

DAV



More information about the R-help mailing list