Sorry - thought I already replied.
When you click on the button in the IDE, I think it will run the code in another fresh R Session. Usually when build a package, you don't want your user configuration to impact hence the fact that this sessions may not be loading the .Rprofile. (it could be running R with the --no-init-file flag)
Yes - makes sense and explains the problem.
However, this button execute devtools::document() on the current folder. You can run this line of code in your current session where .Rprofile has already been loaded and I guess this would work. Can you try ?
Yes - that works.
Also, can I ask why, as I understand, you are managing package dependencies for your development with your .Rprofile ?
I wanted to keep packages specific for the development of a certain package separate from my main library, and never got packrat to work as expected, and I assume it would have the same problems.
But I reverted now back to one huge user library.
Thanks.