First of all: Really great and helpful book. Thanks a lot for writing and sharing!
Summary of the issue
I Could not run the monopoly simulation example for code profiling in chapter 7 with the code given in the book.
The problem is that the profile is produced but the source file monopoly.R is not available, so Figure 7.2 could not be reproduced.
I solved the issue by cloning and building the package locally, but probably there is a better solution?
Details of what I tried
First, I installed the package from source like described in the text:
When I did the profiling as suggested in the book, it works but the source file monopoly.R is not available. So I get the profile but I cannot reproduce the screenshot Figure 7.2 showing the profile per line of code.
I thought this might have something to do with the warning I got, so instead I tried:
First of all: Really great and helpful book. Thanks a lot for writing and sharing!
Summary of the issue
I Could not run the monopoly simulation example for code profiling in chapter 7 with the code given in the book. The problem is that the profile is produced but the source file
monopoly.R
is not available, so Figure 7.2 could not be reproduced. I solved the issue by cloning and building the package locally, but probably there is a better solution?Details of what I tried
First, I installed the package from source like described in the text:
This installed the package but got me a warning:
When I did the profiling as suggested in the book, it works but the source file
monopoly.R
is not available. So I get the profile but I cannot reproduce the screenshot Figure 7.2 showing the profile per line of code.I thought this might have something to do with the warning I got, so instead I tried:
This installed the package without the warning message but the problem was still that the profile did not show the source file
monopoly.R
What I tried next:
efficient
packageThis worked and the profile shows me the actual source code of
monopoly.R
like shown in Figure 7.2Not sure if I missed anything or if this is a problem that others also ran into.