Calculate the mean of all strictly positive values.

meanPositiveValues(x)

Arguments

x

A vector of values.

Value

The average of all the positive values. Returns NaN is no strictly positive values are found.

Examples

meanPositiveValues(-10:10)
#> [1] 5.5