hi There,
I'm looking for a solution to merge two data frames, into a vector field.
names<-c("Name1", "Name2", "Name3","Name4")
locations<-c("NY,DC,NJ", "DA,MO,CT,AZ", "SL,SV,NJ", "NV,SV,NJ")
players<-data.frame(names, locations)
locs<-c("NY", "DC", "NJ", "DA", "MO", "CT", "AZ", "SL", "SV", "NV")
zips<-c("100", "200", "300", "400", "500", "600","700","800","900", "1000")
zip_map<- data.frame(locs,zips)
im expecting an output as below, i wanted to merge the map the zip_code based on the locations array.
out_put<-players
zip<-c("100,200,300", "400,500,600,700", "800,900,300", "1000,900,300")
v<-data.frame(zip)
out_put<-cbind(out_put, v)
please help.