Yes, now I see. It's ridiculous that I haven't noticed this elementary error, which I know of for over 10 years. :)
Now my problem, it's another question. Here is the code and data, as requested. Sample data, I've copied a part of text file: Charge Strobe [1] Charge FC [2] Charge SG [3] Carcass FC [1] Carcass Strobe [2] Carcass SG [3] Chart Strobe [1] Chart FC [2] Chart SG [3] Boy Strobe [1] Boy FC [2] Boy SG [3] Wires Strobe [1] Wires SG [2] Wires FC [3] Now I read them and make last column numeric: votes<-read.table("comparison.txt", col.names=c("Object", "Method", "Vote")) votes$Rank <- as.numeric(votes$Vote) Now I want to see for each method how many it has first, second and last places: for(m in levels(votes$Metod)) { print(c(m, hist(votes[with(votes, Method == m), "Rank"], breaks=0:3, plot=FALSE)$counts)) } Oups... And now I've found my error, thanks to Opera's spell checker. I have missed the letter 'h' in Method. -- Best regards, Vladimir mailto:wl2...@gmail.com ______________________________________________ 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.