My apologies for not including enough information to properly access the issue. Anyway,I want to compare different pairs of linear models and record their p-values into a table. Where my troubles lie is that I cannot extract only the p-value.
TC <- matrix(data=NA, nrow=1, ncol=6)
ML5 <- 1:5
for(B in ML5) {
Coop <- anova(M6,Models5[[B]])$"Pr(>F)"
TC[1,B] <- Coop
}
>Coop
NA 2.041767e-05
So how do I only put the number into the table and not the NA into the table?
Thanks a million!