Q:

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

0

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.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now