Murray Cooper wrote:
Dear Dr Murdoch,
I understand in principle your explanation, but specifically where in the
source distribution are these functions found? For instance, I would like
to look at the code for model.matrix. Ex:
ans <- .Internal(model.matrix(t, data))
I have looked at the source distribution but been unable to locate the
file which contains model.matrix.
... which suggests that either you lack stamina or the ability to use
search tools. It's not all that hard.
Anyways, the .Internal functions are dispatched via the table in
src/main/names.c, in this case to do_modelmatrix in src/main/model.c
[...@titmouse2 R]$ find -name \*.c | xargs grep 'model\.matrix'
./src/main/model.c: warning(_("problem with term %d in model.matrix:
no columns are assigned"),
./src/main/names.c:{"model.matrix",do_modelmatrix, 0, 11, 2,
{PP_FUNCALL, PREC_FN, 0}},
[...@titmouse2 R]$ find -name \*.c | xargs grep 'do_modelmatrix'
./src/main/model.c: /* and is ultimately called by do_modelmatrix. */
./src/main/model.c:SEXP attribute_hidden do_modelmatrix(SEXP call, SEXP
op, SEXP args, SEXP rho)
./src/main/names.c:{"model.matrix",do_modelmatrix, 0, 11, 2,
{PP_FUNCALL, PREC_FN, 0}},
--
O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalga...@biostat.ku.dk) FAX: (+45) 35327907
______________________________________________
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.