This should be due to the fact that "110809 60 0" is not interpreted as a valid time value.
You probably want to have time.t <- 0:3599 rather than time.t <- 1:3600 if you want one value for each second in the hour, starting from 00:00:00 and running to 00:59:59. 00:60:00 is not a proper time value. On Thu, Sep 1, 2011 at 7:18 AM, J. Augusiak <jaugus...@googlemail.com>wrote: > Dear list, > > > > I want to create a POSIX time vector as follows: > > > > day <- as.character("110809") > > time.t <- 1:3600 > > t.min <- time.t %/% 60 > > t.sec <- time.t-t.min*60 > > DATE <- as.POSIXct(strptime(paste(day,t.min,t.sec),"%y%m%d %M%S")) > > Tail(DATE) > > > > > > The problem is that the last element (3600) returns a NA and I don't > understand why. 600, 1200, 2400 no problem, only 3600. Any helpful advice > is > highly appreciated :) > > > > Cheers, > > > > Jacqueline > > > > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- ___________________________ Luke Miller Postdoctoral Researcher Marine Science Center Northeastern University Nahant, MA (781) 581-7370 x318 [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.