Hard coded variable Overall is causing unusual popup of view window.
Hard coded variable Overall does not like to be a sort variable or renamed.
How to fix?
library(caret)
cat("\n","Variable Importance")
names(df2)
one<- df2[,c(3:14)]
names(one)
two <- df2[,15]
two
temp <- filterVarImp(one,two)
class(temp) #data.frame
str(temp) #12 numeric observations of 1 variable called Overall
feature <- row.names(temp) #12 alphanumeric observations z x1 x2 ... x11
Overall <- temp$Overall
temp2 <- cbind(feature,Overall) #VIEW WINDOW POPS UP HERE. STOP HOW??????????
temp2 <- as.data.frame(temp2)
str(temp2) # 12 obs. of 2 variables (feature,Overall)
#this code does not sort by temp2$Overall WHY???????????????????????????????
temp3 <- temp2[order(temp2$Overall, decreasing = TRUE),]
str(temp3)
print(temp3)
#this code does sort by Overall (gotten from working memory)
temp4 <- temp2[order(Overall, decreasing = TRUE),]
str(temp4)
print(temp4)
names(temp4)
names(temp4)[2] <- "importance"
names(temp4)
print(temp4)