all_is_numeric | R Documentation |
Tests, without issuing warnings, whether all elements of a character vector are legal numeric values, or optionally converts the vector to a numeric vector. Leading and trailing blanks in x are ignored.
all_is_numeric(x, extras = c(".", NA))
x |
a character vector |
extras |
a vector of character strings to count as numeric values, other than "". |
a logical value
all_is_numeric(c("1", "1.2", "3"))
all_is_numeric(c("1", "1.2", "3a"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.