[R] Why are integers coded as e.g. "2L" in R functions?

Alexander Engelhardt alex at chaotic-neutral.de
Thu May 15 12:54:11 CEST 2014


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



More information about the R-help mailing list