Consider the following R code: x <- c(3, 8) if (x[1] > 5 || x > 5) print("ok") else print("no") What is shown when the code is run in R 4.3?
AError in x[1] > 5 || x > 5 : 'length = 2' in coercion to 'logical(1)'
BError: the condition has length > 1
C[1] "no"
D[1] "ok"
🔒 Answer hidden — practise on Mcqkart to check yourself and see the explanation.
Want more like this? Create a free account to practise a full test, track your progress, and get spaced-repetition review.
Practise on Mcqkart →🎓 Book an expert →