Re: [R] Merging variables

2016-06-06 Thread PIKAL Petr
iginal Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Michael > Dewey > Sent: Monday, June 6, 2016 3:46 PM > To: g.maub...@weinwolf.de; r-help@r-project.org > Subject: Re: [R] Merging variables > > X-Originating-<%= hostname %>-IP: [217.15

Re: [R] Merging variables

2016-06-06 Thread Michael Dewey
X-Originating-<%= hostname %>-IP: [217.155.205.190] Dear Georg I find it a bit surprising that you end up with customer.x and customer.y. Can you share with us a toy example of two data.frames which exhibit this behaviour? On 06/06/2016 13:29, g.maub...@weinwolf.de wrote: Hi All, I merged

Re: [R] Merging variables

2016-06-06 Thread PIKAL Petr
M > To: r-help@r-project.org > Subject: [R] Merging variables > > Hi All, > > I merged two datasets: > > ds_merge1 <- merge(x = ds_bw_customer_4_match, y = > ds_zww_customer_4_match, > by.x = "customer", by.y = "customer", > all.x = TRUE,

Re: [R] Merging variables

2016-06-06 Thread David Winsemius
You loop through each row but during each iteration you assign a value to the entire "mismatch" column. The last value assigned was 1. Sent from my iPhone > On Jun 6, 2016, at 8:29 AM, g.maub...@weinwolf.de wrote: > > Hi All, > > I merged two datasets: > > ds_merge1 <- merge(x = ds_bw_custome

Re: [R] Merging variables

2016-06-06 Thread David Winsemius
You loop through each Sent from my iPhone > On Jun 6, 2016, at 8:29 AM, g.maub...@weinwolf.de wrote: > > Hi All, > > I merged two datasets: > > ds_merge1 <- merge(x = ds_bw_customer_4_match, y = > ds_zww_customer_4_match, > by.x = "customer", by.y = "customer", > all.x = TRUE, all.y = FALSE

[R] Merging variables

2016-06-06 Thread G . Maubach
Hi All, I merged two datasets: ds_merge1 <- merge(x = ds_bw_customer_4_match, y = ds_zww_customer_4_match, by.x = "customer", by.y = "customer", all.x = TRUE, all.y = FALSE) R created a new dataset with the variables customer.x and customer.y. I would like to merge these two variable back