[Rd] seq.Date requires by

Vadim Ogranovich vograno at evafunds.com
Sat Dec 4 01:31:46 CET 2004


This is not too convincing. The following works:
> seq(from=as.Date("1996-01-01"), to=as.Date("1996-12-01"), by=1)
so how does the system know that 1 is one day? 

Thanks,
Vadim

> -----Original Message-----
> From: r-devel-bounces at stat.math.ethz.ch 
> [mailto:r-devel-bounces at stat.math.ethz.ch] On Behalf Of Paul Roebuck
> Sent: Friday, December 03, 2004 2:17 PM
> To: R Devel Mailing List
> Subject: Re: [Rd] seq.Date requires by
> 
> On Fri, 3 Dec 2004, Vadim Ogranovich wrote:
> 
> > 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
> >
> 
> >From a programming aspect, default to 1 what? day? hour?
> minute? second? microsecond? How would it determine what unit 
> you desired from the [pre]converted value it received as an argument?
> 
> ----------------------------------------------------------
> SIGSIG -- signature too long (core dumped)
> 
> ______________________________________________
> R-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list