Re: [R] Select range of dates

2006-10-08 Thread Gabor Grothendieck
And here is a fourth: as.numeric(format(dd, %Y)) + (quarters(dd) Q1) On 10/8/06, Gabor Grothendieck [EMAIL PROTECTED] wrote: Here are three alternative ways to get the fiscal year as a numeric value assuming: dd - as.Date(x$Date,%d/%m/%Y) # add one to year if month is past March

[R] Select range of dates

2006-10-07 Thread Ian Broom
Hello, This is likely fairly silly question, and I apologize to whomever takes the time to respond. I am a relatively new user of R, on Windows XP, version 2.3.1. Say I have a data table that looks like the following: x Date Location Amount Blue Green 1 01/01/2001 Central1817

Re: [R] Select range of dates

2006-10-07 Thread Gabor Grothendieck
Here are three alternative ways to get the fiscal year as a numeric value assuming: dd - as.Date(x$Date,%d/%m/%Y) # add one to year if month is past March as.numeric(format(dd, %Y)) + (format(dd, %m) 03) # same but using POSIXlt # (Even though there are no time zones involved I have seen #