Slip 1 - E) Write an R program to find the maximum and the minimum value of a given vector.

Solution: 

nums = c(10, 20, 30, 40, 50, 60)
print('Original vector:')
print(nums)   
print(paste("Maximum value of the said vector:",max(nums)))
print(paste("Minimum value of the said vector:",min(nums)))

Post a Comment

0 Comments