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]]
______________________________________________
[email protected] 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.