How to find the Minimum of Three Numbers in R - Step by Step Examples
How to find the Minimum of Three Numbers in R ?
Answer
To find the minimum of three numbers in R, you can use the `min` function.
✐ Examples
1 Find Minimum of Three Numbers
In this example,
- We declare three variables
a
,b
, andc
with the numbers to compare. - We use the `min` function to compare the numbers and get the minimum.
R Program
a <- 5
b <- 8
c <- 3
min_val <- min(a, b, c)
cat('Minimum of three numbers is:', min_val, '\n')
Output
Minimum of three numbers is: 3
Summary
In this tutorial, we learned How to find the Minimum of Three Numbers in R language with well detailed examples.