Home Python C Language C ++ HTML 5 CSS Javascript Java Kotlin SQL DJango Bootstrap React.js R C# PHP ASP.Net Numpy Dart Pandas Digital Marketing

R Median :


Sure, let's talk about the median in the context of R language.

In simple terms, the median is a measure of central tendency, which means it gives you an idea of the middle value in a set of numbers. To find the median in R, you can use the median() function.

Here's a quick example:

Suppose you have a dataset representing the ages of a group of people:

example

ages <- c(20, 25, 30, 35, 40, 45, 50)

To find the median age from this dataset, you'd use the median() function like this:

example

median_age <- median(ages)

In this case, the median age would be 35. That means half of the people in the group are younger than 35, and half are older than 35. It's the middle value when the numbers are arranged in ascending order.


Advertisement





Q3 Schools : India


Online Complier

HTML 5

Python

java

C++

C

JavaScript

Website Development

HTML

CSS

JavaScript

Python

SQL

Campus Learning

C

C#

java