3

I'm confused as to how to get Rprof to work with R.

I followed the sample in the documentation and had something like

Rprof(filename="testProfile.out")
test()
Rprof(NULL)
summaryRprof("testProfile.out")

However, inside testProfile.out, I had one line : sample.interval=20000

This confuses me and when I run summaryRProf, I get no events were recorded

Any suggestions would be appreciated.

user1431282
  • 6,535
  • 13
  • 51
  • 68

1 Answers1

3

The issue was that my test was completing too quickly and Rprof was not logging at fast enough intervals. To fix, this you can either set interval = 0.0002 or some number smaller than the default value (0.02). I was also able to fix this by running my test for multiple iterations.

user1431282
  • 6,535
  • 13
  • 51
  • 68