Slip 5 - E) Write an R program to find Sum, Mean and Product of a Vector.

 Solution:

x = c(10, 20, 30)
print("Sum:")
print(sum(x))
print("Mean:")
print(mean(x))  
print("Product:")
print(prod(x))

Post a Comment

0 Comments