rcmdcheck() appears to always take the version of R from the calling session, with no way to override this by setting R_HOME:
system("/usr/local/bin/Rscript -e 'rcmdcheck::rcmdcheck(...)'")
# ─ using R version 4.4.0 (2024-04-24)
system("/usr/local/bin/Rscript -e 'rcmdcheck::rcmdcheck(..., env=c(R_HOME=\"/path/to/rdevel\")'")
# WARNING: ignoring environment value of R_HOME
# ─ using R version 4.4.0 (2024-04-24)
system("/path/to/rdevel/bin/Rscript -e 'rcmdcheck::rcmdcheck(...)'")
# ─ using R Under development (unstable) (2024-08-16 r87026)
system("/path/to/rdevel/bin/Rscript -e 'rcmdcheck::rcmdcheck(..., env=c(R_HOME=\"/usr/local\")'")
# WARNING: ignoring environment value of R_HOME
# ─ using R Under development (unstable) (2024-08-16 r87026)
Am I perhaps doing something wrong? I can of course call rcmdcheck() in a subprocess, but it would be nice to easily write res <- rcmdcheck(...); process(res) in the current session (without needing {callr}).
rcmdcheck()
appears to always take the version of R from the calling session, with no way to override this by settingR_HOME
:Am I perhaps doing something wrong? I can of course call
rcmdcheck()
in a subprocess, but it would be nice to easily writeres <- rcmdcheck(...); process(res)
in the current session (without needing {callr}).