Message-ID: <49BD015C.4060108@idi.ntnu.no>
Date: 2009-03-15T13:23:40Z
From: Wacek Kusnierczyk
Subject: primitives again
In-Reply-To: <2d1ebb110903142052y47da9865m294bff433fb5c22e@mail.gmail.com>
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