Description Usage Arguments Details Value See Also
View source: R/Data_Mgt_Functions.R
Returns the regular maxima of the input values x using max(x) except it just returns NA when x is an empty vector.
1 |
x |
Numeric or character arguments. |
na.rm |
A logical indicating whether missing values should be removed. |
=============================================================================
This function solves warnings issued by max() when it is used on an empty vector. Using max(numeric(0)) yields a warning "no non-missing arguments to max; returning -Inf" and is very slow about doing that. So, robustmax() is a replacement function that just returns NA when the vector is empty. That speeds things up dramatically.
A length one vector. The type of the result will be that of the highest of the inputs in the hierarchy integer < double < character.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.