1.

Which function is difficult to implement?(a) Lapply(b) Japply(c) Vapply(d) ZapplyI have been asked this question at a job interview.I'm obligated to ask this question of Functions in portion Control Structures, Functions, Scoping Rules, Loop Functions and Debugging of R Programming

Answer»

The correct OPTION is (c) VAPPLY

Easy explanation: Vapply allows the programmer to specific the output type. The disadvantage of USING vapply is that it is verydifficult to be implemented and more verbose. vapply is SIMILAR to sapply, but has a pre-specified type of return VALUE, so it can be safer to use.



Discussion

No Comment Found

Related InterviewSolutions