Vidyalelo
R Programming · Q65

Control Structures in R Programming

Programming · R Programming · question 65

Q65

What will be the output of the following R code? > x for(i in 1:4) + ## Print out each element of 'x' + print(x[i]) +

A.
[1] "a"
[1] "b"
[1] "c"
[1] "d"
Answer
B.
[1] "c"
[1] "b"
[1] "a"
[1] "d"
C.
[1] "d"
[1] "c"
[1] "b"
[1] "a"
D.
Error

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board