Re: [R] subsetting comparison problem

2018-03-11 Thread Jim Lemon
Hi Neha, This might help: R<-read.table(text="C1 C2 C3 C4 R1 0 1 0 1 R2 1 0 1 1 R3 1 0 0 0", header=TRUE) U<-read.table(text="C1 C2 C3 C4 U1 1 1 0 1 U2 1 1 1 1", header=TRUE) # these are matrices - I think this will work for dataframes as well for(ui in 1:dim(U)[1]) { for(ri in 1:dim(R)[1]) {

Re: [R] subsetting comparison problem

2018-03-11 Thread David Winsemius
> On Mar 11, 2018, at 3:32 PM, Neha Aggarwal wrote: > > Hello All, > I am facing a unique problem and am unable to find any help in R help pages > or online. I will appreciate your help for the following problem: > I have 2 data-frames, samples below and there is an

Re: [R] subsetting comparison problem

2018-03-11 Thread Jeff Newmiller
Responses inline. On Sun, 11 Mar 2018, Neha Aggarwal wrote: Hello All, I am facing a unique problem and am unable to find any help in R help pages or online. I will appreciate your help for the following problem: I have 2 data-frames, samples below and there is an expected output R