Hello R help list, I am using the mda package and in particular the fda routine to classify a set of 4409 trips. I preformed a flexible discriminant analysis (FDA) using a set of 148 trips. A total of 36 predictors were considered. the resulting FDA rule was applied to the 4409 trips and for the same predictors in order to predict to which group the trip will belong. A consistent error is occuring: Error in mindist[l] <- ndist[l] : NAs are not allowed in subscripted assignments script: matriz <- read.table("matriz2010.txt", header=T, sep="\t") names(matriz) matrizR <- matriz[,-c(1:9, 11:15, 32, 35, 36, 47, 50, 51, 56)] names(matrizR) matrizRR <- matrizR[,-c(2:7)] names(matrizRR) SKA <- read.table("SKA.txt", header=T, sep="\t") names(SKA) matrizRRSKA <- cbind(matrizRR, SKA) names(matrizRRSKA) summary(matrizRRSKA) #discriminant analysis FDAaSKA <- fda(as.factor(ARTE_resumida) ~ . , data =matrizRRSKA) FDAaSKA plot(FDAaSKA) *Misclassification Error: 0.02027 confusion(FDAaSKA) write.table(confusion(FDAaSKA), "confusion_FDAgeral3.txt") FDAaSKA matrizT <- read.table("matriz2010tot.txt", header=T, sep="\t") names(matrizT) summary(matrizT) dim(matrizT) matrizTR <- matrizT[,-c(1:6, 17, 20, 21, 32, 35, 36)] names(matrizTR) predict(FDAaSKA, matrizTR)$class Error in mindist[l] <- ndist[l] : NAs are not allowed in subscripted assignments if someone can help, would be very grateful. cheers, Catarina [[alternative HTML version deleted]]