I want to test a character string and see which elements could actually be numeric. I can use regex to test for integer successful but am looking to see which elements have
Avoid re-inventing the wheel with check.numeric() from package varhandle.
The function accepts the following arguments:
v The character vector or factor vector. (Mandatory)
na.rm logical. Should the function ignore NA? Default value is FLASE since NA can be converted to numeric. (Optional)
only.integer logical. Only check for integers and do not accept floating point. Default value is FALSE. (Optional)
exceptions A character vector containing the strings that should be considered as valid to be converted to numeric. (Optional)
ignore.whitespace logical. Ignore leading and tailing whitespace characters before assessing if the vector can be converted to numeric. Default value is TRUE. (Optional)