Message-ID: <7acc7a990903150829k91cb6f0j8ebac6efbc550761@mail.gmail.com>
Date: 2009-03-15T15:29:46Z
From: Erin Hodgess
Subject: primitives again
In-Reply-To: <49BD015C.4060108@idi.ntnu.no>
Thank you
On Sun, Mar 15, 2009 at 8:23 AM, Wacek Kusnierczyk
<Waclaw.Marcin.Kusnierczyk at idi.ntnu.no> wrote:
> Edna Bell wrote:
>> How do I find the functions which are primitives, please?
>>
>
> you can scan the whole search path for functions that are primitives:
>
> ? ?primitives = sapply(search(), function(path)
> ? ? ? with(as.environment(path), Filter(is.primitive, lapply(ls(), get))))
>
> primitives is a list of named lists of primitives, one sublist for each
> attached package (most sublists will be empty, i guess).
>
> vQ
>
> ______________________________________________
> R-help at 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.
>
--
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: erinm.hodgess at gmail.com