Re: [R] Isolating Distinct Dates between two data frames

2020-03-01 Thread Ogbos Okike
Dear Sarah, Thank you for your contribution. I have tried to use merge function as suggested. But the function seems to work with data frame. And the file cannot be in the form of data frame as they have different lengths. I also tried whether I can use the function without data frame. It didn't w

Re: [R] Isolating Distinct Dates between two data frames

2020-03-01 Thread Ogbos Okike
Dear Jim, Many thanks for sparing your time to assist me. I have tried your codes. It worked very well to some extent for me. At least it produced the indices you mentioned. But I got stuck when I think of how to use it in further calculations as you indicated. I tried including the indices as th

Re: [R] Isolating Distinct Dates between two data frames

2020-03-01 Thread Ogbos Okike
Dear Jeff, I had initially set to plain text. I didn't know when it reverted to HTML. It has been corrected. Thanks for informing me. I have checked ?setdiff. The examples are well explained, so it was not hard for me to use. However, it did not seem to tackle my problem. I have two columns but it

Re: [R] Isolating Distinct Dates between two data frames

2020-03-01 Thread Jim Lemon
Hi Ogbos, One way to get all combinations of common and different dates is: THULinINVK<-which(THUL1$V1 %in% INVK1$V1) THULnotinINVK<-which(!(THUL1$V1 %in% INVK1$V1)) INVKinTHUL<-which(INVK1$V1 %in% THUL1$V1) INVKnotinTHUL<-which(!(INVK1$V1 %in% THUL1$V1)) This produces vectors of indices that can

Re: [R] Isolating Distinct Dates between two data frames

2020-03-01 Thread Jeff Newmiller
a) Your use of HTML is corrupting your data. Post using plain text, and use dput output instead of trying to insert tables. b) You should read about ?setdiff. On March 1, 2020 1:12:04 PM PST, Ogbos Okike wrote: >Dear Friends, >I have two data frame of the form: >1997-11-2219 -2.54910135429339 >

Re: [R] Isolating Distinct Dates between two data frames

2020-03-01 Thread Sarah Goslee
Look at the all arguments to merge() - you can keep the non-matching dates, and look for NA values in the data. Sarah On Sun, Mar 1, 2020 at 4:12 PM Ogbos Okike wrote: > > Dear Friends, > I have two data frame of the form: > 1997-11-2219 -2.54910135429339 > 1997-11- -2.66865640466636 > 1997-