safe_min | R Documentation |
min
but suppress the warning when all values are missingThis function is a drop-in replacement for min
, which is used in
cat_summarise
. It suppresses the warning when all values are NA and
na.rm is TRUE, and returns NA instead of Inf.
safe_min(x, na.rm = FALSE)
x |
A numerical vector. |
na.rm |
A boolean indicating whether to remove NAs. |
The min of x
or NA when values are missing.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.