meanWithoutNA {maDB} | R Documentation |
meanWithoutNA
This function calculates the mean from the data submitted by excluding all NA and NULL values.
meanWithoutNA(Data)
Data |
A vector containing the values from which the mean should be calculated. NA and NULL values are removed before the calculation. |
Simple function to calculate the mean from a values vector.
Johannes Rainer
data <- c(2,3,5,1,NA,NULL,3,NA) data meanWithoutNA(data)