Re: [R] merging to data.frames whose columns are different but follow a pattern.

2011-10-25 Thread Dennis Murphy
Hi: Try this: INDIVIDUAL <- transform(INDIVIDUAL, IDHOUS = IDPERS %/% 100) merge(INDIVIDUAL, HOUSHOLD, by = c('IDHOUS', 'T')) IDHOUS T IDPERS SEX PC02 GHS Single COM2 NBPERS NBKID 1 41 1 4101 19 1 NA2 5 3 2 41 1 4102 20 0 NA2 5 3

[R] merging to data.frames whose columns are different but follow a pattern.

2011-10-25 Thread ManuelS
Hi, I'm working with panel data from the Swiss Houshold Panel (SHP). The data i got came in the following way: 1.) 12 *different* /individual/ files - one for each year . 2.) 12 *different* /houshold/ files - again: one for each year Each file came in the SPSS format (.sav). I implemented all the