Re: [R] Undesired result

2021-02-17 Thread Val
Very helpful and thank you so much! On Wed, Feb 17, 2021 at 12:50 PM Duncan Murdoch wrote: > > On 17/02/2021 9:50 a.m., Val wrote: > > HI All, > > > > I am reading a data file which has different date formats. I wanted to > > standardize to one format and used a library anytime but got > > unde

Re: [R] Undesired result

2021-02-17 Thread Duncan Murdoch
Just a quick note: you can simplify my function and speed it up quite a bit if speed is an issue. I had forgotten that the POSIXlt type could act like a vector; using that you don't need those inner for loops, and with a little calculation you can also do without the outer while loops. Dunca

Re: [R] Undesired result

2021-02-17 Thread Duncan Murdoch
On 17/02/2021 9:50 a.m., Val wrote: HI All, I am reading a data file which has different date formats. I wanted to standardize to one format and used a library anytime but got undesired results as shown below. It gave me year 2093 instead of 1993 library(anytime) DFX<-read.table(text="name dd

Re: [R] Undesired result

2021-02-17 Thread John Kane
You have 4 " addFormats" commands. Maybe add one more? On Wed, 17 Feb 2021 at 10:00, Val wrote: > HI All, > > I am reading a data file which has different date formats. I wanted to > standardize to one format and used a library anytime but got > undesired results as shown below. It gave me year

[R] Undesired result

2021-02-17 Thread Val
HI All, I am reading a data file which has different date formats. I wanted to standardize to one format and used a library anytime but got undesired results as shown below. It gave me year 2093 instead of 1993 library(anytime) DFX<-read.table(text="name ddate A 19-10-02 D 11/19/2006 F