is_single_numeric | R Documentation |
Check whether a value is a single numeric
is_single_numeric(x)
x |
A value to be tested |
## Not run: library(assertthat) assert_that(is_single_numeric(1)) # TRUE assert_that(is_single_numeric(Inf)) # TRUE assert_that(is_single_numeric(1.6)) # TRUE assert_that(is_single_numeric(NA)) # Error: NA is not a single numeric value assert_that(is_single_numeric(1:6)) # Error: 1:6 is not a single numeric value assert_that(is_single_numeric("pie")) # Error: "pie" is not a single numeric value ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.