adplus-dvertising
frame-decoration

Question

Body of lapply function is?

a.

function (X, FUN, ...)
{
FUN <- match.fun(FUN)
if (!is.vector(X) || is.object(X))
X <- as.list(X)
.Internal(lapply(X, FUN))
}

b.

function (X, FUN, ...)
{
FUN <- match.fun(FUN)
if (!is.vector(X) | is.object(X))
X <- as.list(X)
.Internal(lapply(X, FUN))
}

c.

function (X, FUN, ...)
{
FUN <- match.fun(FUN)
if (is.vector(X) || is.object(X))
X <- as.list(X)
.Internal(lapply(X, FUN))
}

d.

function (X, FUN, ...)
{
FUN <- match.fun(FUN)
if (is.vector(X) || is.object(X))
}

Posted under R Programming

Answer: (a).function (X, FUN, ...)
{
FUN <- match.fun(FUN)
if (!is.vector(X) || is.object(X))
X <- as.list(X)
.Internal(lapply(X, FUN))
}

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Body of lapply function is?