Q:

Write a R program to find the minimum and the maximum of a Vector

0

Write a R program to find the minimum and the maximum of a Vector.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

x = c(10, 20, 30, 25, 9, 26)
print("Original Vectors:")
print(x)
print("Maximum value of the above Vector:")
print(max(x))
print("Minimum value of the above Vector:")
print(min(x))

Sample Output:

[1] "Original Vectors:"
[1] 10 20 30 25  9 26
[1] "Maximum value of the above Vector:"
[1] 30
[1] "Minimum value of the above Vector:"
[1] 9

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now