Incomplete sheet
This sheet is incomplete and could use some attention. Please submit code snippet suggestions as an issue or PR here.
integer
For representing integer values
Constants
| Action |
Code |
Details |
|
Min integer
|
|
|
|
Max integer
|
|
|
Missing value (NA)
|
|
|
Create
| Action |
Code |
Details |
|
Empty integer vector, length 0
|
|
|
Integer vectors
| Action |
Code |
Details |
|
Integer vector of zeros, length n
|
|
|
|
Cast to integer
|
|
|
|
Parse string to integer
|
|
Parse failures return NA |
Test
| Action |
Code |
Details |
|
Is integer
|
|
|
Integer vectors
| Action |
Code |
Details |
Vectors are pairwise equal (no NAs present)
|
|
|
All elements are equal (no NAs present)
|
|
|
All elements are equal, igorning NAs)
|
min(x, na.rm = TRUE) == max(x, na.rm = TRUE)
|
|
Convert
| Action |
Code |
Details |
|
To numeric
|
|
|
| Action |
Code |
Details |
|
To character
|
|
|
|
Format with thousands separator (comma)
|
|
|
|
Format with sign prefix
|
formatC(x, format = 'fg', flag = '+')
|
|