testNumericCompatible | R Documentation |
This function checks if a given variable is inherently numeric. It returns TRUE if the variable can be converted to a numeric value without loss of information and is not inherently a character string, otherwise it returns FALSE.
testNumericCompatible(x)
x |
The variable to be tested. Default: NA. |
A logical value indicating whether the input is inherently numeric.
testNumericCompatible(0.1) # Should return TRUE
testNumericCompatible("0.1") # Should return TRUE
testNumericCompatible("apple") # Should return FALSE
testNumericCompatible("arma.0.1") # Should return FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.