powered by
simple function to extract numbers from string/vector
ParseNumber(x, digits = FALSE)
string or vector
logical, indicating whether or not to extract decimals, Default: FALSE
na.omit
# NOT RUN { ParseNumber("String1WithNumbers2") # [1] 1 2 # }
Run the code above in your browser using DataLab