Displaying 3 results from an estimated 3 matches for "do_mapply".
2011 Sep 29
1
Looking for internal of a function
Dear all, when I look at the internal of mapply() function, I see a line of
code:
answer <- .Call("do_mapply", FUN, dots, MoreArgs, environment(),
PACKAGE = "base")
Can somebody please tell me how to find the source code of 'do_mapply'
Thanks,
[[alternative HTML version deleted]]
2006 Aug 31
2
Wish: keep names in mapply() result
...c/library/base/R/mapply.R (working copy)
@@ -3,8 +3,16 @@
FUN <- match.fun(FUN)
dots <- list(...)
+ if(!is.null(names(dots[[1]]))) {
+ isNamed <- TRUE
+ namesX <- names(dots[[1]])
+ } else {
+ isNamed <- FALSE
+ }
+
answer<-.Call("do_mapply", FUN, dots, MoreArgs, environment(),
PACKAGE="base")
+ if(isNamed) names(answer) <- namesX
if (USE.NAMES && length(dots) && is.character(dots[[1]]) &&
is.null(names(answer))) names(answer) <- dots[[1]]
@@ -47,4 +55,4...
2013 Mar 03
1
Missing PROTECT in mkPRIMSXP ?
...1414
#2 0x00007ffff7908463 in Rf_DispatchOrEval (call=0x164d5c0, op=0x4d772a0,
generic=0x7ffff7a8b0ef "length", args=0x53325d0, rho=0x5334428,
ans=0x7ffffffe45a0, dropmissing=0, argsevald=1)
at /home/biocbuild/src/R-3.0.r62077/src/main/eval.c:2413
#3 0x00007ffff792c318 in do_mapply (call=0x164d5c0, op=<optimized out>,
args=<optimized out>, rho=0x5334428)
at /home/biocbuild/src/R-3.0.r62077/src/main/mapply.c:49
...
we get to
(gdb) l mapply.c:49
44 /* Cache the .Primitive: unclear caching is worthwhile. */
45 static SEXP...