# Summarise Data in R – How to get mean and standard deviation in R # Summarise Data in R – How to get mean and standard deviation in R

In R, the mean and standard deviation are common measures of central tendency and variability of a dataset. Mean is a measure of central tendency that gives you an idea of the average value of a dataset, whereas standard deviation is a measure of variability that gives you an idea of how spread out the values of a dataset are.

In R, you can calculate the mean of a dataset using the mean() function. This function takes a numeric vector as an argument, and returns the mean of the values in the vector. For example, if you have a dataset called “data”, you can calculate the mean by using the command mean(data)

To calculate the standard deviation of a dataset, you can use the sd() function. This function also takes a numeric vector as an argument and returns the standard deviation of the values in the vector. For example, if you have a dataset called “data”, you can calculate the standard deviation by using the command sd(data)

In summary, In R, the mean and standard deviation are common measures of central tendency and variability of a dataset. Mean is a measure of central tendency that gives you an idea of the average value of a dataset, whereas standard deviation is a measure of variability that gives you an idea of how spread out the values of a dataset are. You can calculate the mean of a dataset in R using the mean() function and the standard deviation of a dataset using the sd() function. Both functions take a numeric vector as an argument and return the mean or standard deviation of the values in the vector.

In this Applied Machine Learning & Data Science Recipe (Jupyter Notebook), the reader will find the practical use of applied machine learning and data science in R programming: How to get mean and standard deviation in R.