Not that it brings closure, but there's also https://stat.ethz.ch/pipermail/r-devel/2017-June/074462.html Henrik On Sat, Aug 25, 2018, 06:40 Marc Schwartz via R-devel <r-devel at r-project.org> wrote:> On Aug 25, 2018, at 9:26 AM, Hadley Wickham <h.wickham at gmail.com> wrote: > > > > Hi all, > > > > Would someone mind pointing to me to the inspiration for the use of > > the L suffix to mean "integer"? This is obviously hard to google for, > > and the R language definition > > (https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Constants) > > is silent. > > > > Hadley > > > The link you have above, does reference the use of 'L', but not the > derivation. > > There is a thread on R-Help from 2012 ("Difference between 10 and 10L"), > where Prof. Ripley addresses the issue in response to Bill Dunlap and the > OP: > > https://stat.ethz.ch/pipermail/r-help/2012-May/311771.html > > In searching, I also found the following thread on SO: > > > https://stackoverflow.com/questions/22191324/clarification-of-l-in-r/22192378 > > which had a link to the R-Help thread above and others. > > Regards, > > Marc Schwartz > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >[[alternative HTML version deleted]]
I always thought it meant "Long" (I'm assuming R's integers are long integers in C sense (iirrc one can declare 'long x', and it being common to refer to integers as "longs" in the same way we use "doubles" to mean double precision floating point). But pure speculation on my part, so I'm curious! On Sat, Aug 25, 2018 at 6:50 AM Henrik Bengtsson <henrik.bengtsson at gmail.com> wrote:> Not that it brings closure, but there's also > https://stat.ethz.ch/pipermail/r-devel/2017-June/074462.html > > Henrik > > On Sat, Aug 25, 2018, 06:40 Marc Schwartz via R-devel < > r-devel at r-project.org> > wrote: > > > On Aug 25, 2018, at 9:26 AM, Hadley Wickham <h.wickham at gmail.com> wrote: > > > > > > Hi all, > > > > > > Would someone mind pointing to me to the inspiration for the use of > > > the L suffix to mean "integer"? This is obviously hard to google for, > > > and the R language definition > > > ( > https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Constants) > > > is silent. > > > > > > Hadley > > > > > > The link you have above, does reference the use of 'L', but not the > > derivation. > > > > There is a thread on R-Help from 2012 ("Difference between 10 and 10L"), > > where Prof. Ripley addresses the issue in response to Bill Dunlap and the > > OP: > > > > https://stat.ethz.ch/pipermail/r-help/2012-May/311771.html > > > > In searching, I also found the following thread on SO: > > > > > > > https://stackoverflow.com/questions/22191324/clarification-of-l-in-r/22192378 > > > > which had a link to the R-Help thread above and others. > > > > Regards, > > > > Marc Schwartz > > > > ______________________________________________ > > R-devel at r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- http://carlboettiger.info [[alternative HTML version deleted]]
On 25 August 2018 at 09:28, Carl Boettiger wrote: | I always thought it meant "Long" (I'm assuming R's integers are long | integers in C sense (iirrc one can declare 'long x', and it being common to | refer to integers as "longs" in the same way we use "doubles" to mean | double precision floating point). But pure speculation on my part, so I'm | curious! It does per my copy (dated 1990 !!) of the 2nd ed of Kernighan & Ritchie. It explicitly mentions (sec 2.2) that 'int' may be 16 or 32 bits, and 'long' is 32 bit; and (in sec 2.3) introduces the I, U, and L labels for constants. So "back then when" 32 bit was indeed long. And as R uses 32 bit integers ... (It is all murky because the size is an implementation detail and later "essentially everybody" moved to 32 bit integers and 64 bit longs as the 64 bit architectures became prevalent. Which is why when it matters one should really use more explicit types like int32_t or int64_t.) Dirk -- http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org