Learn R Programming

specieschrom (version 1.0.0)

nanmean4: Mean of the n highest values of a vector.

Description

Estimates the mean of the n% highest values in vector x.

Usage

nanmean4(x, n)

Value

mean of the n% highest values in vector x

Arguments

x

a vector with the values to average

n

an integer corresponding to the percentage of values to use