Find Mean in R – R Statistics Tutorials

Facebook3TwitterGoogle+Pinterest0Mean or arithmetic mean of a dataset is the average or central value of the discrete set of numbers. It can be found the sum of all number divided...

Mean or arithmetic mean of a dataset is the average or central value of the discrete set of numbers. It can be found the sum of all number divided by total numbers. You can find Mean in R using a few simple steps.

To practice this, we assume that you have installed R on your computer and you have beginner level understanding with this language.

Even if you don’t have used the R before, this tutorial is very simple. You just have to follow the steps.

Find Mean in R – Example

Let’s assume there is a cruise ship Santa Maria with the people of following age group.


You are asked to find the average age of the passengers of this cruise ship.

The function mean() is used to calculate this Mean in R.

Step 1: Create a Vector in R

Vectors are generally created using the c() function. This must contain the same type of data. 


Remember: R is case-sensitive


Find Mean



Press enter and this will generate your output. This tutorial is for the smaller datasets. In upcoming tutorials, we will discuss finding the Mean Value using R in larger datasets which is the main purpose of using R.

If you have any query regarding this tutorial. Feel Free to ask.


Author is a Science Journalist and Cyberbullying Activist. He Founded Cyberbullying Awareness Oragnization in Pakistan.
No Comment

Leave a Reply


  • Best Education Apps in Google Play Store

    Facebook16TwitterGoogle+Pinterest1Smartphones aren’t just for making calls and using social media. There are tonnes of Great Apps available on Google Play Store that can help you to increase your learning...
  • Self Learning [Beginner’s Guide]

    Facebook27TwitterGoogle+Pinterest1Learn as if you to live forever. “Self Learning” is an instructional strategy to take charge of your learning process, often referred as self-directed learning. Adult education scholar named Dr....
  • 6 Free Online Citation Tools for Good

    Facebook5TwitterGoogle+Pinterest5Need to make a quick citation? Don’t have time to download the citation software?  Quick online citation tools can be very helpful if you are not dealing with too...
  • Best Places to Learn Python – Free Online

    Facebook16TwitterGoogle+Pinterest0 Python is an object oriented programming (OOP) language. You can almost do anything with It just like any other programming language. It is recommended for beginners to start...
%d bloggers like this: