Re: [R] Comparing 2 dale columns

2017-08-24 Thread PIKAL Petr
COL2 1 2014-01-06 2015-01-05 2 2014-01-07 2015-01-05 > Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Patrick > Casimir > Sent: Wednesday, August 23, 2017 4:54 PM > To: r-help@r-project.org<mailto:r-help@r-proje

Re: [R] Comparing 2 dale columns

2017-08-23 Thread William Dunlap via R-help
> > test$COL2 > test$COL1 > [1] TRUE TRUE > > test > COL1 COL2 > 1 2014-01-06 2015-01-05 > 2 2014-01-07 2015-01-05 > > > > Cheers > Petr > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] O

Re: [R] Comparing 2 dale columns

2017-08-23 Thread Patrick Casimir
sage- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Patrick > Casimir > Sent: Wednesday, August 23, 2017 4:54 PM > To: r-help@r-project.org > Subject: [R] Comparing 2 dale columns > > Dear R fellows, > > > I created a new column Date_flag to compa

Re: [R] Comparing 2 dale columns

2017-08-23 Thread Patrick Casimir
Hi Mark, Instead of 1 and 0. It generates NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA From: Mark Sharp Sent: Wednesday, August 23, 2017 11:28:39 AM To: Patrick Casimir Cc: r-help@r-project.org Subject: Re: [R] Comparing 2 dale columns

Re: [R] Comparing 2 dale columns

2017-08-23 Thread Mark Sharp
Patrick, ## Run the following script an notice the different values of the dataframe "data" in each instance. # I understand you have done something like the following: data <- data.frame(COL1 = c("6/1/14", "7/1/14"), COL2 = c("5/1/15", "5/1/15"), stringsAsFactors = FALSE) dat

Re: [R] Comparing 2 dale columns

2017-08-23 Thread PIKAL Petr
-01-05 > Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Patrick > Casimir > Sent: Wednesday, August 23, 2017 4:54 PM > To: r-help@r-project.org > Subject: [R] Comparing 2 dale columns > > Dear R fellows, >

[R] Comparing 2 dale columns

2017-08-23 Thread Patrick Casimir
Dear R fellows, I created a new column Date_flag to compare the dates of COL1 and COL2 using the code below. But it showed that 5/1/15 is greater than 6/1/2014 and 5/1/2015 greater than 7/1/2014 despite the year is greater. How do I fix that? I did try to format as %y/%m/%d but it does not f