top3mean {wrMisc} | R Documentation |
Mean Of 3 Highest Values
Description
This function returns the mean of the top3 highest values.
Usage
top3mean(x, silent = FALSE, debug = FALSE, callFrom = NULL)
Arguments
x |
(numeric vector) main input |
silent |
(logical) suppress messages |
debug |
(logical) additional messages for debugging |
callFrom |
(character) allows easier tracking of messages produced |
Details
Generally, NA
will be excluded, if all values are NA
this finction will return NULL
;
thus, in case of (entirely) unsuitable data (non-numeric ...) NULL
will be returned.
If data has subgroups you may try a tapply -way.
Value
This function returns a vector with single numeric value for mean of top3
( returns NULL
with invalid input or if all input is NA
)
See Also
Examples
x1 <- c(15:11,NA,16)
top3mean(x1)
[Package wrMisc version 1.15.4 Index]