Re: [R] dataframe selection using a multi-value key

2010-09-07 Thread Markus Weisner
Hi Erik and Jim. Both solutions did the trick. Thanks you!! --Markus On Tue, Sep 7, 2010 at 9:05 PM, jim holtman wrote: > try this: > > > merged_data = merge(incidents, responses, by=c("INC_NO", "INC_YEAR"), > all=TRUE) > > # responses that don't match > > subset(merged_data, is.na(INC_TYPE),

Re: [R] dataframe selection using a multi-value key

2010-09-07 Thread jim holtman
try this: > merged_data = merge(incidents, responses, by=c("INC_NO", "INC_YEAR"), > all=TRUE) > # responses that don't match > subset(merged_data, is.na(INC_TYPE), select=c(INC_NO, INC_YEAR, UNIT_TYPE)) INC_NO INC_YEAR UNIT_TYPE 11 8 2018E3 12 8 2018E7 13

Re: [R] dataframe selection using a multi-value key

2010-09-07 Thread Erik Iverson
Hello, On 09/07/2010 07:25 PM, Markus Weisner wrote: I am merging two dataframes using a relational key (incident number and incident year), but not all the records match up. I want to be able to review only the records that cannot be merged for each individual dataframe (essentially trying to

[R] dataframe selection using a multi-value key

2010-09-07 Thread Markus Weisner
I am merging two dataframes using a relational key (incident number and incident year), but not all the records match up. I want to be able to review only the records that cannot be merged for each individual dataframe (essentially trying to select records from one dataframe using a multi-value re