Programming
Python
R
Java
C
C++
C#
WEB
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
MORE
Examples1
Python
GO
R
Java
C
C++
C#
Examples2
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Seo Tools
Code Minifier
Code Beautifier
Language Compiler
Misc Tools
File Converter
References
C
C++
Python
Java
PHP
JavaScript
Examples
Python
R
Java
C
C++
C#
HTML
CSS
JavaScript
BootStrap4
jQuery
SVG
Home
About
Contact
JetPack
Multi Themes-->>
Code it ALL
Scroll TOP
Mean in R - CodeGK
Δ R Examples
Box_plot
Plotting Data using Box Plot in R
Linear_regression
Linear Regression in R
Scatter_plot
Plotting Data using Scatter Plot in R
Mean_mode_mode
Mean in R
Median in R
Mode in R
Bar_chart
Plotting Data Using Bar Chart in R
Array
Array in R
Histogram
Plotting Data using Histogram in R
Line_graph
Plotting Data using Line Graph in R
Pie_chart
Plotting Data In Pie Char in R
Lists
R Lists
♦ Mean in R
♣ Example1: Mean in R
Mean is the average of the Data Set.
It can be found by the mean() method in R.
In this example, mean is calculated for Vector of Data Points.
Example
Input:
Run CODE
Reload Code
Copy Code
# Creating a Vector data <- c(6,8,1,3,-5,0,4,-55,3,7,40,-6) # Find Mean result.mean <- mean(data) print(result.mean)
Output:
Mean_mode_mode
Mean in R