I am having a variable holding value a <- " 1/2"
. how to convert it into numeric value like this b <- 1/2
. And from 'b' I want to extract 1.
is it possible to extract 1 from "a" without converting it into numeric?
Note: Here my string(a) contains space before 1.