Skip to content

R help

3 messages · Arango, Ana, Shant Ch, David Winsemius

3 days later
#
On Nov 20, 2011, at 10:46 PM, Shant Ch wrote:

            
As is documented in ?strptime

%y
Year without century (00?99). On input, values 00 to 68 are prefixed  
by 20 and 69 to 99 by 19 ? that is the behaviour specified by the 2004  
and 2008 POSIX standards, but they do also say ?it is expected that in  
a future version the default century inferred from a 2-digit year will  
change?.
Perhaps some greppingg surgery?

 > as.Date(sub("(.+/.+/)([0-6])", "\\119\\2", "1/1/69"),"%m/%d/%Y")
[1] "1969-01-01"

You have not really described the problem completely .... what is the  
range of dates we need to work with?  Do you have any "1/1/05"  type  
values and if so what century should be assumed?
David Winsemius, MD
West Hartford, CT