Consider the following R code: x <- rep(1:3, times = 3:1) y <- rep(1:2, each = 2, length.out = 5) c(sum(x), y) What is printed when the code is run?
A[1] 10 1 1 2 2 1
B[1] 10 1 1 2 2 2
C[1] 10 1 2 1 2 1
D[1] 14 1 1 2 2 1
🔒 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 →