Write a R program to access the last value in a given vector.
x = c(10, 20, 30, 20, 20, 25, 9, 26) print("Original Vectors:") print(x) print("Access the last value of the said vector:") print(tail(x, n=1))
Sample Output:
[1] "Original Vectors:" [1] 10 20 30 20 20 25 9 26 [1] "Access the last value of the said vector:" [1] 26
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer