v.demartino2@virgilio.it
2005-Jun-23 10:30 UTC
[R] Building a vector of dates between extreme dates
I would like to build a data.frame with a column of POSIXct dates orderly differing one day per row exactly, that is: Data dato1 01/06/2005 ....... 02/06/2005 ....... .............. 29/06/2005 ........ 30/06/2005 etc giving the extreme dates 01/06/2005 & 30/06/2005. How can i obtain this result? Vittorio
Prof Brian Ripley
2005-Jun-23 11:03 UTC
[R] Building a vector of dates between extreme dates
Use seq.POSIXct (or seq.Date since you seem to have dates and not date-times), in just the same way you would use seq() for numbers. On Thu, 23 Jun 2005 v.demartino2 at virgilio.it wrote:> I would like to build a data.frame with a column of POSIXct dates orderly > differing one day per row exactly, that is: > > Data dato1 > 01/06/2005 ....... > 02/06/2005 ....... > .............. > 29/06/2005 ........ > 30/06/2005 etc > > > giving the extreme dates 01/06/2005 & 30/06/2005.-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595