I have two datasets, one from the head of the household and from the other spouse. I would like to merge these two. However, I feel that I may be carrying out the merge incorrectly. I would use the table below to elaborate on my problem.
Area Household line
1 11 7
11 1 7
To create the matching variable , I have to add these three variables and I expect the MV to come out as
1 11 7
11 1 7
But what I get is 1117 for these two different individuals, when I use the code below.
MV <-as.numeric (paste0(x$area, x$household, x$line , sep=""))
How do I ensure that I get the expected MV?