s-news
[Top] [All Lists]

tree of functions

To: <s-news@lists.biostat.wustl.edu>
Subject: tree of functions
From: "QUATAERT, Paul" <Paul.QUATAERT@inbo.be>
Date: Fri, 8 Feb 2008 09:33:33 +0100
Thread-index: AchqLUqpTDdhHMy6QAWEwV7exUu0Rg==
Thread-topic: tree of functions

Hi,

 

I am looking for a function that can find the tree of functions called in a function that are not S-plus functions.

 

Suppose I call this function "treefunc.my" and I have a function "a.my" that calls other personal functions and Splus functions

 

a.my <- function(x) {b.my(x); e.my(x); cat("The end\n")}

b.my <- function(x) c.my(x)

c.my <- function(x) d.my(x)

d.my <- function(x) print(x)

e.my <- function(x) print(1/x)

 

then, treefunc.my(a.my) should give something like that

+ b.my

++ c.my

+++ d.my

+ e.my

 

And ignore cat & print

 

Thanks a lot,

Paul

 

Paul Quataert

 

Instituut voor Natuur- en Bosonderzoek (INBO)

Research Institute for Nature and Forest

Gaverstraat 4

B-9500 Geraardsbergen

 

tel ++ 32 (0)54 437 136

fax ++ 32 (0)54 436 160

 

e-mail: paul.quataert@inbo.be

www.inbo.be

 

Het Instituut voor Natuur- en Bosonderzoek (INBO) is ontstaan door de fusie van het Instituut voor Bosbouw en Wildbeheer (IBW) en het Instituut voor Natuurbehoud (IN).

The new Research Institute for Nature and Forest results from the merger of the Institute for Forestry and Game Management and the Institute of Nature Conservation.

 

<Prev in Thread] Current Thread [Next in Thread>