[R] hello

From: elyakhlifi mustapha <elyakhlifi_mustapha_at_yahoo.fr>
Date: Wed, 02 May 2007 08:16:29 +0000 (GMT)


hello,
I have a problem with a R program I don't understand my errors my program looks like this

> for(i in LE) {

+    for(j in LEC[[i]]) {
+                for(k in LR) {
+                         donRep[[k]] <- subset(don2, Id_Essai == 1006961 & Id_Cara == j & Id_Rep == k  & Id_Geno != 65125, select = Val_O)
+                         M[[j]] <- matrix(rep(1, 3*length(donRep[[1]][,1])), nrow =length(donRep[[1]][,1]), ncol = 3)
+                        for(k in LR) {
+              M[[j]][,k] <- as.numeric(as.character(donRep[[k]][,1]))
+                }
+                         }
+                print(M[[j]])
+                if (subset(donParCara, Id_Cara == j , select = Ana_C) == "AV")
+               {print(cor(M[[j]], method = "pearson"))}  else{print(cor(M[[j]], method = "spearman"))}
+ }
+       }
Erreur dans M[[j]][, k] <- as.numeric(as.character(donRep[[k]][, 1])) : 
        le nombre d'objets  remplacer n'est pas multiple de la taille du remplacement



and sometimes it run good but sometimes there are errors I don't understand why. Can you help me please?       


        [[alternative HTML version deleted]]



R-help_at_stat.math.ethz.ch 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. Received on Wed 02 May 2007 - 08:30:47 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 May 2007 - 10:31:34 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.