[R] exporting a split list

Alexy Khrabrov deliverable at gmail.com
Tue Nov 27 12:41:05 CET 2007

Using wk <- with(d, split(word, kind)), I get the following class table:

[1] "a" "bra" ...  # (*)

"ca" "dabra" ...

Now I need to export it in the following format:

class    num_members   examples
1          23                       a bra ...
10        4                         ca dabra

For each class C such as `1`, I need to print the number of members,  
length(wk[[C]]), and show N examples as sample(wk[[C]], N), space- 
separated.  The columns themselves are tab-separated.

What's the R way to export such as list?

More information about the R-help mailing list