asone@latte.harvard.edu
2003-Jan-12 09:10 UTC
[R] Problem about Rprof() (Windows build 1.6.2)
Dear R users: I have a problem about Rprof() on R for windows (Version 1.6.2 (2003-01-10)). When I tried to run an R program, which yields non-empty profiling results with Rcmd Rprof on R (windows: Version 1.5.0 Patched (2002-06-12)), I got the following empty result: Each sample represents 0.01 seconds. Total run time: seconds. Total seconds: time spent in function and callees. Self seconds: time spent in function alone. % total % self total seconds self seconds name % self % total self seconds total seconds name summaryRprof() was also tried, but what I got is the following message:> summaryRprof(filename = "Rprof_xtab_none.out")Error in summaryRprof(filename = "Rprof_xtab_none.out") : no events were recorded>I noticed this problem when I tested the same R program on R (windows) Version 1.6.1 last year. Did I miss some important announcement concerning Rprof() between R 1.5. 0 and 1.6.1? My platform-R_version information is as follows: sysname=Windows release=NT 5.0 version=(build 2195) Service Pack 3 machine=x86 platform=i386-pc-mingw32 arch=i386 os=mingw32 system=i386, mingw32 statusmajor=1 minor=6.2 year=2003 month=01 day=10 language=R Akio Sone HU-MIT data center
Rprof() example(lm) Rprof(NULL) summaryRprof() works perfectly here on the build I installed an hour ago. Did you perchance forget to turn profiling off as in the third line, so the file was not closed? On Sun, 12 Jan 2003 asone at latte.harvard.edu wrote:> Dear R users: > > I have a problem about Rprof() on R for windows (Version 1.6.2 > (2003-01-10)). > > When I tried to run an R program, which yields non-empty profiling > results with Rcmd Rprof on R (windows: Version 1.5.0 Patched > (2002-06-12)), I got the following empty result:-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272860 (secr) Oxford OX1 3TG, UK Fax: +44 1865 272595
asone@latte.harvard.edu
2003-Jan-13 15:19 UTC
[R] Problem about Rprof() (Windows build 1.6.2)
Thank you for your advice, Prof. Ripley. What I found after your e-mail is as follows: when the following 4 command lines are typed in R Console one by one on R (windows) Version 1.6.2 (2003-01-10), Rprof() example(lm) Rprof(NULL) summaryRprof() I got profiling results. However, when I typed the following line in the R console, Rprof(); example(lm); Rprof(NULL); summaryRprof() or the above 4 command lines were saved as a program file, "testRprof.R", and it was executed as: >source("C:/asone/R/testRprof.R") then I got the following error: Error in summaryRprof() : no events were recorded When I tried the last two approaches, i.e., Rprof(); example(lm); Rprof(NULL); summaryRprof() source("C:/asone/R/testRprof.R") with R (windows) Version 1.5.0 Patched (2002-06-12) with "Rcmd Rprof Rprof.out", I could get profiling results. So is this a problem concerning not Rprof but the command interpreter? Akio Sone HU-MIT data center> -----Original Message----- > From: r-help-admin at stat.math.ethz.ch > [mailto:r-help-admin at stat.math.ethz.ch] On Behalf Of Prof > Brian D Ripley > Sent: Monday, January 13, 2003 8:23 AM > To: asone at latte.harvard.edu > Cc: r-help at stat.math.ethz.ch; dmurdoch at pair.com > Subject: Re: [R] Problem about Rprof() (Windows build 1.6.2) > > > Rprof() > example(lm) > Rprof(NULL) > summaryRprof() > > works perfectly here on the build I installed an hour ago. > > Did you perchance forget to turn profiling off as in the > third line, so the file was not closed? > > > On Sun, 12 Jan 2003 asone at latte.harvard.edu wrote: > > > Dear R users: > > > > I have a problem about Rprof() on R for windows (Version 1.6.2 > > (2003-01-10)). > > > > When I tried to run an R program, which yields non-empty profiling > > results with Rcmd Rprof on R (windows: Version 1.5.0 Patched > > (2002-06-12)), I got the following empty result: > > -- > Brian D. Ripley, ripley at stats.ox.ac.uk > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272860 (secr) > Oxford OX1 3TG, UK Fax: +44 1865 272595 > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > http://www.stat.math.ethz.ch/mailman/listin> fo/r-help >