Vidyalelo
R Programming · Q4

Control Structures in R Programming

Programming · R Programming · question 4

Q4

In R, what is the syntax for the for loop?

A.
for (i in 1:10) { code_block }
Answer
B.
for (i = 1 to 10) { code_block }
C.
for (i = 1; i <= 10; i++) { code_block }
D.
for (i from 1 to 10) { code_block }

Answer: Option A

Solution

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