I've been wondering what L means in the R computing context, and was wondering if someone could point me to a reference where I could read about it, or tell me what it's called so that I can search for it myself. (L by itself is a little too general for a search term). I encounter it in strange places, most recently in the "save" documentation. save(..., list = character(0L),> file = stop("'file' must be specified"), > ascii = FALSE, version = NULL, envir = parent.frame(), > compress = !ascii, compression_level, > eval.promises = TRUE, precheck = TRUE) >I remember that you can also find it when you step inside an apply function:> sapply(1:10, function(x)browser()) > Called from: FUN(1:10[[1L]], ...) >I apologize for being vague, it's just something that I would like to understand about the R language (the R word). Thank you! Gene [[alternative HTML version deleted]]
Gene, it's described in ?NumericConstants HTH, Erik Gene Leynes wrote:> I've been wondering what L means in the R computing context, and was > wondering if someone could point me to a reference where I could read about > it, or tell me what it's called so that I can search for it myself. (L by > itself is a little too general for a search term). > > I encounter it in strange places, most recently in the "save" documentation. > > save(..., list = character(0L), >> file = stop("'file' must be specified"), >> ascii = FALSE, version = NULL, envir = parent.frame(), >> compress = !ascii, compression_level, >> eval.promises = TRUE, precheck = TRUE) >> > > I remember that you can also find it when you step inside an apply function: > >> sapply(1:10, function(x)browser()) >> Called from: FUN(1:10[[1L]], ...) >> > > I apologize for being vague, it's just something that I would like to > understand about the R language (the R word). > > Thank you! > > Gene > > [[alternative HTML version deleted]] > > ______________________________________________ > 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.
On 02/23/2011 05:08 PM, Gene Leynes wrote:> I've been wondering what L means in the R computing context, and was > wondering if someone could point me to a reference where I could read about > it, or tell me what it's called so that I can search for it myself. (L by > itself is a little too general for a search term).It means that the number is an integer (a _L_ong integer of 32 bit actually)> > I encounter it in strange places, most recently in the "save" documentation. > > save(..., list = character(0L), >> file = stop("'file' must be specified"), >> ascii = FALSE, version = NULL, envir = parent.frame(), >> compress = !ascii, compression_level, >> eval.promises = TRUE, precheck = TRUE) >> > > I remember that you can also find it when you step inside an apply function: > >> sapply(1:10, function(x)browser()) >> Called from: FUN(1:10[[1L]], ...) >> > > I apologize for being vague, it's just something that I would like to > understand about the R language (the R word). > > Thank you! > > Gene > > [[alternative HTML version deleted]] > > ______________________________________________ > 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.-- Claudia Beleites Dipartimento dei Materiali e delle Risorse Naturali Universit? degli Studi di Trieste Via Alfonso Valerio 6/a I-34127 Trieste phone: +39 0 40 5 58-37 68 email: cbeleites at units.it
Hi Gene, It means 'Literal integer'. So 1L is a proper integer 1, and 0L is a proper integer 0. Hope it helps, Tsjerk On Wed, Feb 23, 2011 at 5:08 PM, Gene Leynes <gleynes+r at gmail.com> wrote:> I've been wondering what L means in the R computing context, and was > wondering if someone could point me to a reference where I could read about > it, or tell me what it's called so that I can search for it myself. ?(L by > itself is a little too general for a search term). > > I encounter it in strange places, most recently in the "save" documentation. > > save(..., list = character(0L), >> ? ? ?file = stop("'file' must be specified"), >> ? ? ?ascii = FALSE, version = NULL, envir = parent.frame(), >> ? ? ?compress = !ascii, compression_level, >> ? ? ?eval.promises = TRUE, precheck = TRUE) >> > > I remember that you can also find it when you step inside an apply function: > >> sapply(1:10, function(x)browser()) >> Called from: FUN(1:10[[1L]], ...) >> > > I apologize for being vague, it's just something that I would like to > understand about the R language (the R word). > > Thank you! > > Gene > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Tsjerk A. Wassenaar, Ph.D. post-doctoral researcher Molecular Dynamics Group * Groningen Institute for Biomolecular Research and Biotechnology * Zernike Institute for Advanced Materials University of Groningen The Netherlands
The notation '1L' mean to interprete the data as an 'integer'.> str(1)num 1> str(1L)int 1> > str(0xaa)num 170> str(0xaaL)int 170 On Wed, Feb 23, 2011 at 11:08 AM, Gene Leynes <gleynes+r at gmail.com> wrote:> I've been wondering what L means in the R computing context, and was > wondering if someone could point me to a reference where I could read about > it, or tell me what it's called so that I can search for it myself. ?(L by > itself is a little too general for a search term). > > I encounter it in strange places, most recently in the "save" documentation. > > save(..., list = character(0L), >> ? ? ?file = stop("'file' must be specified"), >> ? ? ?ascii = FALSE, version = NULL, envir = parent.frame(), >> ? ? ?compress = !ascii, compression_level, >> ? ? ?eval.promises = TRUE, precheck = TRUE) >> > > I remember that you can also find it when you step inside an apply function: > >> sapply(1:10, function(x)browser()) >> Called from: FUN(1:10[[1L]], ...) >> > > I apologize for being vague, it's just something that I would like to > understand about the R language (the R word). > > Thank you! > > Gene > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Jim Holtman Data Munger Guru What is the problem that you are trying to solve?