[R] seq

Omar Lakkis uofiowa at gmail.com
Mon Apr 10 20:00:43 CEST 2006


Can someone, please, help explain to me why the following two calls
return the same set:

>  seq(from=as.POSIXlt('2005-12-4'), to=as.POSIXlt('2006-4-2'), by='weeks')
 [1] "2005-12-04 EST" "2005-12-11 EST" "2005-12-18 EST" "2005-12-25 EST"
 [5] "2006-01-01 EST" "2006-01-08 EST" "2006-01-15 EST" "2006-01-22 EST"
 [9] "2006-01-29 EST" "2006-02-05 EST" "2006-02-12 EST" "2006-02-19 EST"
[13] "2006-02-26 EST" "2006-03-05 EST" "2006-03-12 EST" "2006-03-19 EST"
[17] "2006-03-26 EST" "2006-04-02 EST"

>  seq(from=as.POSIXlt('2005-12-4'), to=as.POSIXlt('2006-4-9'), by='weeks')
 [1] "2005-12-04 EST" "2005-12-11 EST" "2005-12-18 EST" "2005-12-25 EST"
 [5] "2006-01-01 EST" "2006-01-08 EST" "2006-01-15 EST" "2006-01-22 EST"
 [9] "2006-01-29 EST" "2006-02-05 EST" "2006-02-12 EST" "2006-02-19 EST"
[13] "2006-02-26 EST" "2006-03-05 EST" "2006-03-12 EST" "2006-03-19 EST"
[17] "2006-03-26 EST" "2006-04-02 EST"


> seq
function (...)
UseMethod("seq")
<environment: namespace:base>

I am using R 2.2.1 on linux.
Why isn't "2006-04-09" in the response of the second call?




More information about the R-help mailing list