Write a R program to create a vector and find the length and the dimension of the vector.
v = c(1,3,5,7,9) print("Original vectors:") print(v) print("Dimension of the vector:") print(dim(v)) print("length of the vector:") print(length(v))
Sample Output:
[1] "Original vectors:" [1] 1 3 5 7 9 [1] "Dimension of the vector:" NULL [1] "length of the vector:" [1] 5
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