[R] Re-sort list of vectors

Jan Hummel Hummel at mpimp-golm.mpg.de
Mon Aug 15 17:10:44 CEST 2005


Hi.
Can anyone suggest a simple way to re-sort in R a list of vectors of the
following form?

input
$"1"
	a	b	c
	1	2	3
$"2"
	a	b	c
	4	5	6

Output should be something like:
"a"
	"1" 1
	"2" 4
"b"
	"1" 2
	"2" 5
"c"
	"1" 3
	"2" 6

I've been futzing with mapply(), outer(), split(), rbind() and so on but
haven't found an elegant solution.

Thanks,
Jan.

P.S. E-mailed CCs of posted replies appreciated.




More information about the R-help mailing list