From k.hansen at biostat.ku.dk  Wed Jul 28 01:29:24 2004
From: k.hansen at biostat.ku.dk (k.hansen@biostat.ku.dk)
Date: Wed Jul 28 01:29:30 2004
Subject: [Rd] summaryRprof (PR#7137)
Message-ID: <20040727232924.F0344FC29@slim.kubism.ku.dk>

Full_Name: Kasper Daniel Hansen
Version: 1.9.1
OS: linux
Submission from: (NULL) (128.32.208.249)


summaryRprof gives a very different result than R CMD Rprof. This is because
summaryRprof does not record calls starting with a dot, most notably .C calls.

Following a suggestion by P.Dalgaard I tried replacing the two ls calls with
ls(, all.names = TRUE). IE. the two lines

    totalt <- sapply(ls(envir = total), function(f) get(f, envir = total))
    selft <- sapply(ls(envir = self), function(f) get(f, envir = self))

was replaced with


    totalt <- sapply(ls(envir = total, all.names= TRUE), 
                     function(f) get(f, envir = total))
    selft <- sapply(ls(envir = self, all.names = TRUE), 
                    function(f) get(f, envir = self))

This seemed to solve the problem.


[Rd] summaryRprof (PR#7137)
k.hansen@biostat.ku.dk