R - Integer
Table of Contents
About
The integer class
Articles Related
Initialization
Numeric format is the default number system. If you explicitly want an integer, you need to specify it with the L suffix.
Combine
When using the combine function, integer must be also specified with the suffix L
> v=c(1L,3L,-5L)
> str(v)
int [1:3] 1 3 -5
> v <- c(1L)
> class(v)
[1] "integer"
Colon
With the sequence operator
> v=5:10
> str(v)
int [1:6] 5 6 7 8 9 10