[R] Odp: merge two data frames

2010-08-04 Thread Petr PIKAL
Hi you tried OK result <- merge(zz, av, by="DESCRIPTION", all=TRUE) and as you did not specify what to do when one value is NA here is one possible solution rowSums(cbind(result$PL.x, result$PL.y), na.rm=T) Regards Petr r-help-boun...@r-project.org napsal dne 04.08.2010 11:52:00: > Dear li

[R] Odp: merge

2010-04-16 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 16.04.2010 14:00:09: > I have a problem with the merge command. > I have to merge two dataframe that looks like the following example: > > CODPROD N1 N3 N4 > 23 3 55 4 > 24