On 02/02/2011 01:50 PM, Ista Zahn wrote:
.Internal functions such as rnorm cannot be retrieved in this way as
far as I know. You may have to download the source and find it
direclty.
In this particular case you can find the implementation of rnorm with
grep -rn --include=*.c '"rnorm"' .
# ./src/main/names.c:449:{"rnorm", do_random2, ...
grep -rn --include=*.c 'do_random2(' .
# ./src/main/random.c:131:SEXP attribute_hidden do_random2(SEXP
call, SEXP op, SEXP args, SEXP rho)
Starting with line 131 in src/main/random.c you can follow the chain of
macro executions and calls to see how rnorm is actually implemented.
vQ
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.