range() function in R Language is used to get the minimum and maximum values of the vector passed to it as argument.
Syntax: range(x, na.rm, finite)
x: Numeric Vector
na.rm: Boolean value to remove NA
finite: Boolean value to exclude non-finite elements
 2 54
 NA NA  2 Inf  2 54
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.