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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -