1.

_____________ will produce a sequential vector c( (1,2,3,4,5,6,7,8,9)).(a) Seq(9)(b) Seq(10)(c) Seq(15)(d) Seq(12)I have been asked this question at a job interview.My query is from Functions in division Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

Right choice is (a) Seq(9)

To explain: Seq generates a sequence of a PRIORI known pattern. Seq_along(6) will produce a vector with length 6 whereas seq(6) will produce a sequential vector from 1 to 6 C((1,2,3,4,5,6)).



Discussion

No Comment Found

Related InterviewSolutions