Hey guys,
I noticed something curious in the lapply call. I'll copy+paste the
function call here because it's short enough:
lapply - function (X, FUN, ...)
{
FUN - match.fun(FUN)
if (!is.vector(X) || is.object(X))
X - as.list(X)
.Internal(lapply(X, FUN))
}
Notice that lapply
On Sat, Jan 5, 2013 at 7:38 PM, Kevin Ushey kevinus...@gmail.com wrote:
Hey guys,
I noticed something curious in the lapply call. I'll copy+paste the
function call here because it's short enough:
lapply - function (X, FUN, ...)
{
FUN - match.fun(FUN)
if (!is.vector(X) ||
On Jan 5, 2013, at 11:38 AM, Kevin Ushey wrote:
Hey guys,
I noticed something curious in the lapply call. I'll copy+paste the
function call here because it's short enough:
lapply - function (X, FUN, ...)
{
FUN - match.fun(FUN)
if (!is.vector(X) || is.object(X))
X - as.list(X)
Hi David,
Yes, it is - although the SO question was more directed at figuring out why
sapply seemed slower, the question to R-help is more nuanced in is this
coercion really necessary for data.frames?, and I figured it might take
some more knowledge of R internals / the difference between lists
4 matches
Mail list logo