[R] Why are integers coded as e.g. "2L" in R functions?
arun
smartpink111 at yahoo.com
Thu May 15 13:03:44 CEST 2014
Hi Alex,
May be this link helps:
http://stackoverflow.com/questions/7014387/whats-the-difference-between-1l-and-1
A.K.
On Thursday, May 15, 2014 6:55 AM, Alexander Engelhardt <alex at chaotic-neutral.de> wrote:
Hello R-help,
I keep noticing R functions that don't compare integers like
if(x == 2)
but instead
if(x == 2L)
Is this a long integer? Also, when do the two notations have a different
effect on the code?
Thanks in advance,
Alex
______________________________________________
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