[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)

HTH,

Thierry

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

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

tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be
www.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
data.
~ 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
nuts.

Thanks,
Tom

> r_squared
[[1]]
[1] 0.9083936

[[2]]
[1] 0.8871647

[[3]]
[1] 0.8193883

[[4]]
[1] 0.728157

[[5]]
[1] 0.8849525

[[6]]
[1] 0.8459416

[[7]]
[1] 0.6702318

[[8]]
[1] 0.02997816

[[9]]
[1] 0.8974268

[[10]]
[1] 0.881217

[[11]]
[1] 0.8006688

[[12]]
[1] 0.7207697

[[13]]
[1] 0.8703734

[[14]]
[1] 0.8384346

[[15]]
[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:
http://n4.nabble.com/comparison-of-these-types-is-not-implemented-tp9641
95p964195.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help at 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.

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