![]() |
VOOZH | about |
mean() function in R Language is used to calculate the arithmetic mean of the elements of the numeric vector passed to it as argument.
Syntax: mean(x, na.rm) Parameters: x: Numeric Vector na.rm: Boolean value to ignore NA valueExample 1: Output:
[1] 3.5 [1] 2.85 [1] -3.5Example 2: Output:
[1] NA [1] 2.75