The suffix āLā is used to specify a numeric value as an integer explicitly. You can also use the as.integer() function to specify an integer type, rather than a double that the standard numeric class is.
Sometimes you can use it to make your code run faster and consume less memory. A double ("numeric") value uses 8 bytes of memory. An integer value uses only 4 bytes of memory.For large vectors, that ensures less memory wastage and less to wade through for the CPU.
For example:
lt <- list(1,2.5,3L,6)
lapply(lt, class)
[[1]]
[1] "numeric"
[[2]]
[1] "numeric"
[[3]]
[1] "integer"
[[4]]
[1] "numeric"
To check memory consumption:
x <- 1:1000
typeof(x)
[1] "integer"
y <- x+1
typeof(y)
[1] "double"
object.size(y)
8048 bytes
z <- x+1L
typeof(z)
[1] "integer"
object.size(z)
4048 bytes