This function returns a vector with single numeric value for mean of top3
( returns NULL with invalid input or if all input is NA)
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.