[R] comparison of these types is not implemented

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Tue Dec 15 14:20:15 CET 2009

Dear Tom,

r_squared is a list of vectors and not a vector. 

Use r_squared[[i]] instead of r_squared[i] or convert r_squared to a
vector with unlist(r_squared)



ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek
team Biometrie & Kwaliteitszorg
Gaverstraat 4
9500 Geraardsbergen

Research Institute for Nature and Forest
team Biometrics & Quality Assurance
Gaverstraat 4
9500 Geraardsbergen

tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
Namens Tom Pitt
Verzonden: dinsdag 15 december 2009 11:30
Aan: r-help at r-project.org
Onderwerp: [R] comparison of these types is not implemented

Hi All,

Can you tell me why I get the error message below?  It's driving me


> r_squared
[1] 0.9083936

[1] 0.8871647

[1] 0.8193883

[1] 0.728157

[1] 0.8849525

[1] 0.8459416

[1] 0.6702318

[1] 0.02997816

[1] 0.8974268

[1] 0.881217

[1] 0.8006688

[1] 0.7207697

[1] 0.8703734

[1] 0.8384346

[1] 0.6237472

> biggest=c(0,0)
> for (i in 1:15) {
+ if (r_squared[i]>biggest[1]) biggest=c(r_squared[i],i)}
Error in r_squared[i] > biggest[1] : 
  comparison of these types is not implemented

View this message in context:
Sent from the R help mailing list archive at Nabble.com.

R-help at r-project.org mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

Druk dit bericht a.u.b. niet onnodig af.
Please do not print this message unnecessarily.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.

More information about the R-help mailing list