Using wk <- with(d, split(word, kind)), I get the following class table:
wk$`1` [1] "a" "bra" ... # (*) wk$`10` "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? Cheers, Alexy ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.