[Rd] summaryRprof (PR#7137)

From: <k.hansen_at_biostat.ku.dk>
Date: Wed 28 Jul 2004 - 09:29:24 EST


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.



R-devel@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-devel Received on Wed Jul 28 09:34:05 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:45:04 EST