[R] strange behaviour of "POSIXlt" "POSIXt" object

William Dunlap wdunlap at tibco.com
Mon Mar 5 16:56:33 CET 2012


1L is the literal integer one, the same value as the result
of as.integer(1.0).  1 is a literal double precision
("numeric") one, the same as 1.0.

Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com 

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of ikuzar
> Sent: Monday, March 05, 2012 6:42 AM
> To: r-help at r-project.org
> Subject: Re: [R] strange behaviour of "POSIXlt" "POSIXt" object
> 
> Hi,
> I'd like to know what "L" means in "1L" in the instruction below:
> for(i in 1:20){ z$mday <- z$mday + 1L ; cat(is.na(z), ": ");print(z)}
> 
> The result :
> FALSE : [1] "2009-02-26 06:30:00"
> FALSE : [1] "2009-02-27 06:30:00"
> FALSE : [1] "2009-02-28 06:30:00"
> FALSE : [1] "2009-03-01 06:30:00"
> FALSE : [1] "2009-03-02 06:30:00"
> FALSE : [1] "2009-03-03 06:30:00"
> FALSE : [1] "2009-03-04 06:30:00"
> FALSE : [1] "2009-03-05 06:30:00"
> FALSE : [1] "2009-03-06 06:30:00"
> FALSE : [1] "2009-03-07 06:30:00"
> FALSE : [1] "2009-03-08 06:30:00"
> FALSE : [1] "2009-03-09 06:30:00"
> FALSE : [1] "2009-03-10 06:30:00"
> FALSE : [1] "2009-03-11 06:30:00"
> FALSE : [1] "2009-03-12 06:30:00"
> FALSE : [1] "2009-03-13 06:30:00"
> FALSE : [1] "2009-03-14 06:30:00"
> FALSE : [1] "2009-03-15 06:30:00"
> FALSE : [1] "2009-03-16 06:30:00"
> FALSE : [1] "2009-03-17 06:30:00"
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/strange-behaviour-of-POSIXlt-POSIXt-
> object-tp4418115p4446305.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at 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.



More information about the R-help mailing list