r convert string to integer code example
Example: r string to integer
# Usage
strtoi(x, base = 0L)
# Arguments
# x
# a character vector, or something coercible to this by as.character.
# base
# an integer which is between 2 and 36 inclusive, or zero (default).
# Examples
strtoi(c("0xff", "077", "123"))
strtoi(c("ffff", "FFFF"), 16L)
strtoi(c("177", "377"), 8L)