Skip to contents

Mean with na.rm=TRUE

Usage

mean_nn(x, ...)

Arguments

x

a vector of numbers

...

other arguments passed to mean

Value

A numeric or complex scalar giving the mean of x, with missing values removed.

Examples

x <- c(NA, 10, 90)
mean(x)
#> [1] NA
mean_nn(x)
#> [1] 50