Arithmetic Mean in R (Example)

This page explains how to calculate the arithmetic mean of a numeric data object in the R programming language.

Example Data

x <- c(6, 6, 8, 5, 3, 9, 1, 7, 5, 2)    # Create example vector

Example: Application of mean Function in R

mean(x)                                 # Compute mean
# 5.2

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed

Menu
Top