[Rd] length of POSIXlt object (PR#13482)

twoutopias at gmail.com twoutopias at gmail.com
Wed Jan 28 23:15:18 CET 2009


The length() of a POSIXlt object is given as 9 regardless of the actual
length. For example:

> make.date.time
function (year=c(2006,2006),month=c(8,8),day=2:5,hour=13,minute=45)
{# convert year, etc., into POSIXlt object
#
d=as.character(make.date(year,month,day))
t=paste(hour,minute,sep=":")
as.POSIXlt(paste(d,t))
}
> t=make.date.time()
> t
[1] "2006-08-02 13:45:00" "2006-08-03 13:45:00" "2006-08-04 13:45:00"
[4] "2006-08-05 13:45:00"
> length(t)
[1] 9
> t[1]
[1] "2006-08-02 13:45:00"
> length(t[1])
[1] 9



-- 
blog.sethroberts.net
www.shangriladiet.com
boards.shangriladiet.com
cell phone 510 418 7753 (Berkeley)

	[[alternative HTML version deleted]]



More information about the R-devel mailing list