From ggrothendieck at myway.com  Sat Dec  4 03:42:37 2004
From: ggrothendieck at myway.com (Gabor Grothendieck)
Date: Sat Dec  4 03:42:45 2004
Subject: [Rd] seq.Date requires by
Message-ID: <20041204024237.6227639B6@mprdmxin.myway.com>



Don't know the answer to your question but note
that chron can do it without by=.

xD <- as.Date("1996-01-01")
yD <- as.Date("1996-12-01")
library(chron)
xc <- chron(xD)
yc <- chron(yD)

seq(xc, yc)

# Also one can do this in either chron or Date:

chron(xc:yc)
as.Date(xD:yD)



Date:   Fri, 3 Dec 2004 11:29:08 -0800 
From:   Vadim Ogranovich <vograno@evafunds.com>
To:   <r-devel@stat.math.ethz.ch> 
Subject:   [Rd] seq.Date requires by 

 
Hi,

What is the reason for seq.Date to require the 'by' argument and not to
default it to 1 in the example below?


> seq(from=as.Date("1996-01-01"), to=as.Date("1996-12-01"))
Error in seq.Date(from = as.Date("1996-01-01"), to =
as.Date("1996-12-01")) : 
exactly two of `to', `by' and `length.out' / `along.with' must be
specified

This is R-1.9.1, but I haven't seen anything pertaining in the release
notes of 2.0.x.

Thanks,
Vadim


[Rd] seq.Date requires by
Gabor Grothendieck