[R] Remove 100 years from a date object

2010-12-10 Thread Daniel Brewer
Hello, I have some data that has dates in the form 27.02.37. I convert them to a date object as follows: as.Date(data$date,format=%d.%m.%y) But this gives me years such as 2037 when I would like them to be 1937. I thought of trying to take off some time i.e. as.Date(camCD$DoB,format=%d.%m.%y)

Re: [R] Remove 100 years from a date object

2010-12-10 Thread Barry Rowlingson
On Fri, Dec 10, 2010 at 3:27 PM, Daniel Brewer daniel.bre...@icr.ac.uk wrote: Hello, I have some data that has dates in the form 27.02.37.  I convert them to a date object as follows: as.Date(data$date,format=%d.%m.%y) But this gives me years such as 2037 when I would like them to be 1937.

Re: [R] Remove 100 years from a date object

2010-12-10 Thread Clint Bowman
There still may be a problem if the dates go back far enough, e.g., 1909. Is '09' 1909 or 2009? No matter what, you have to decide which values need 1900 added and which need 2000. I'd split the date on the delimiter '.', decide whether to add 1900 or 2000, and then paste them together and

Re: [R] Remove 100 years from a date object

2010-12-10 Thread Gabor Grothendieck
On Fri, Dec 10, 2010 at 10:27 AM, Daniel Brewer daniel.bre...@icr.ac.uk wrote: Hello, I have some data that has dates in the form 27.02.37.  I convert them to a date object as follows: as.Date(data$date,format=%d.%m.%y) But this gives me years such as 2037 when I would like them to be 1937.

Re: [R] Remove 100 years from a date object

2010-12-10 Thread Daniel Brewer
On 10/12/2010 4:17 PM, Barry Rowlingson wrote: On Fri, Dec 10, 2010 at 3:27 PM, Daniel Brewer daniel.bre...@icr.ac.uk wrote: Hello, I have some data that has dates in the form 27.02.37. I convert them to a date object as follows: as.Date(data$date,format=%d.%m.%y) But this gives me