which()
match(a, b)
Using integer function (making integer)
y = as.integer(42.5) #forcing print(y)
## [1] 42
class(y)
## [1] "integer"