Write a R program to test whether the value of the element of a given vector greater than 10 or not. Return TRUE or FALSE.
v = c(15,26,9,7,10,0,9,15) print("Original vector:") print(v) print("Test whether the value > 10 or not:") print(v > 10)
Sample Output:
[1] "Original vector:" [1] 15 26 9 7 10 0 9 15 [1] "Test whether the value > 10 or not:" [1] TRUE TRUE FALSE FALSE FALSE FALSE FALSE TRUE
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