Trying to combine 2 data.frame on R with rbind and getting a error in match.names(clabs, names(xi)) : names do not match previous names -
trying combine 2 data.frame on r rbind line of code data.combined <- rbind(train, test.survived) getting error in match.names(clabs, names(xi)) : names not match previous names
the solution problem following codeline while adding survived variable
use this:
test.survived <- data.frame(survived = rep("none", nrow(test)), test[,])
instead of this:
test.survived <- data.frame(survived = rep("none", nrow(test)), test[,])
the difference capital "s" survived row data given in manner
Comments
Post a Comment