View source: R/params_check_types.R
check_numeric | R Documentation |
N.B. This only works for the specific environment (to prevent weird side effects)
check_numeric(
...,
.message = "`{param}` is non-numeric ({err}).",
.env = rlang::caller_env()
)
... |
a list of symbols |
.message |
a glue specification containing |
.env |
the environment to check (defaults to calling environment) |
nothing. called for side effects. throws error if not all variables can be coerced.
a = c(1:4L)
b = c("1",NA,"3.3")
f = NULL
g = NA
check_numeric(a,b,f,g)
c = c("dfsfs")
try(check_numeric(c,d, mean))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.