G'day Edna,

On Sat, 14 Mar 2009 22:52:38 -0500
Edna Bell <edna.bel...@gmail.com> wrote:

> Dear R Gurus:

Well, I guess I can answer nevertheless. :)

> How do I find the functions which are primitives, please?

?is.primitive

Thus, the following code would give you all the primitive functions in
package base:

R> pos <- "package:base"
R> uu <- ls(pos=pos, all=TRUE)
R> tt <- sapply(uu, function(x) is.primitive(get(x, pos=pos)))
R> rr <- uu[tt]
R> rr

You may want to search other packages too.  Or modify the code such
that you loop over your search path and concatenate the results from
the various locations.

HTH.

Cheers,

        Berwin

______________________________________________
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.

Reply via email to