On 20-07-2013, at 19:11, C W <tmrs...@gmail.com> wrote: > Thanks John. > > Why do I get length of 5 and 6? I thought I am only tallying up 1 to 3? >> table(dd) > val > leng TRUE > 1 5 > 2 4 > 3 81 > 5 1 > 6 4
I wouldn't know. Not same data? It's completely unclear, to me at least, what you actually are trying to do. With your initial data, my initial proposal and John's procedure I got > cc <- data.frame(b[[1]], b[[2]]) > names(cc) <- c("leng", 'val') > dd <- subset(cc, val ==TRUE ) > table(dd) val leng TRUE 1 3 3 12 Berend ______________________________________________ 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.