On 4/9/2006 5:57 PM, Diethelm Wuertz wrote:
> Duncan Murdoch wrote:
>
>> On 4/9/2006 5:46 AM, Diethelm Wuertz wrote:
>>
>>> How one can make a list of all functions in R's base
>>> package which are given as Primitives like abs, sqrt
>>> cumsum (but not log) ?
>>
>> There's an is.primitive() test function; you just need to
>
> Sorry when I ask again, how to list all functions in R's
> base installation?
ls(baseenv()) or ls("package:base")
will give you all their names. So you need to use something like
names <- ls(baseenv())
result <- rep(FALSE, length(names))
for (i in seq(along=names)) {
result[i] <- is.primitive(get(names[i], envir=baseenv()))
}
names[result]
Duncan Murdoch
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html