On 4/24/07, Tony Plate <[EMAIL PROTECTED]> wrote:
> I don't think there's that sort of "apply-reduce" function in R, but for
> this problem, the last line below happens to be a "one-liner":

Only if you have character data though:

> x <- lapply(1:10, function(i) sample(20, 15))
> names(which(table(unlist(x))==10))
[1] "14"

(not that it's hard to turn that back into a number)

Hadley

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to