I am developing a package and using renv
. The package has it's own .Rprofile
file, which was created during the renv
initialisation.
I also have a user level .Rprofile
, which naturally doesn't apply to this package. Shouldn't anyway. This file includes some code that uses the DBI
package, which will become relevant in a second.
Here's my issue: when I use the "Install" button on the Build pane*
I get the error:
Error in loadNamespace(x) : there is no package called 'DBI'
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
Which means that the "Install" button is running the wrong .Rprofile
when restarting the session. The only reason I am noticing this is because using renv
means I don't have this particular library installed for this project.
Obviously I could just do that and it would solve my immediate issue. But do I have this wrong or am I missing a setting somewhere?
*
I believe this used to be called Build and reload, which was a more descriptive term and def made it easier to google. Also, the documentation (e.g. this recent article on posit.co) still use the old nomenclature, which is super confusing.