[R] merge question

Dr Eberhard Lisse nospam at lisse.NA
Sun Jun 29 18:24:39 CEST 2014


I have two data frames like so

> qpiso
    iso requests
1    A1       20
2    A2      199
3    AD        5
4    AE      176
...
189  ZW       82

> qplegit
    iso requests
1    A2       36
2    AE        4
3    AM        2
4    AO        1
...
100  ZW        3


I want to create another dataframe qpspam which contains all pairs
from pqiso with the values for requests of qplegit being subtracted
from those which exist in qpiso,

ie
    iso requests
1    A1       20
2    A2      163
3    AD        5
4    AE      172
...
189  ZW       79

but don't know how to do this, and google isn't too helpful.

As usual, a solution is preferred, but a pointer to where I can
read this up is equally appreciated :-)-O

el



More information about the R-help mailing list