[R] What is "print print print" ?

Vladimir eremeev wl2776 at gmail.com
Thu Dec 6 08:31:49 CET 2012


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:wl2776 at gmail.com




More information about the R-help mailing list