Re: [R] Manipulating dates

From: <>
Date: Wed 15 Jun 2005 - 00:14:41 EST

Use POSIX. To convert:

my.dates <- strptime(your.characters, format='%d/%m/%Y')

once you have that, you can use 'min' to find the minimum.

'difftime' will give you the differences.


James Holtman "What is the problem you are trying to solve?" Executive Technical Consultant -- Convergys Labs
+1 (513) 723-2929
                      Richard Hillary                                                                                                      
                      <r.hillary@imperial.a        To:                                                      
            >                        cc:                                                                                     
                      Sent by:                     Subject:  [R] Manipulating dates                                                        
                      06/14/2005 10:07                                                                                                     
                      Please respond to                                                                                                    

          Given a vector of characters, or factors, denoting the date in
the following way: 28/03/2000, is there a method of 1) Computing the earliest of these dates; 2) Using this as a base, then converting all the other dates into merely the number of days after this minimum date Many thanks
Richard Hillary mailing list PLEASE do read the posting guide! mailing list PLEASE do read the posting guide! Received on Wed Jun 15 00:18:37 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:34 EST