Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify R path #181

Closed
liutiming opened this issue Jan 29, 2021 · 1 comment
Closed

How to specify R path #181

liutiming opened this issue Jan 29, 2021 · 1 comment
Labels
reprex needs a minimal reproducible example

Comments

@liutiming
Copy link

There are multiple versions of R installed on my cluster and when I used callr with https://github.com/ropensci/targets and https://github.com/mschubert/clustermq/, although I used R in 3.6.1 and r(function() Sys.which("R")) also returns 3.6.1, the job was submitted in R 4.0... is there an option to specify the path for callr?

@gaborcsardi
Copy link
Member

gaborcsardi commented Jan 30, 2021

callr alawys runs the same version of R in the subprocess, it uses R.home() to query the path of the current version:

callr/R/setup.R

Line 222 in 65e336f

options$bin <- file.path(R.home("bin"), exec)

There is actually a feature request to run a different version than the current: #89.

So if you can reproduce this, and you think it is a callr bug, then please send use some reproducible example.

@gaborcsardi gaborcsardi added the reprex needs a minimal reproducible example label Jan 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reprex needs a minimal reproducible example
Projects
None yet
Development

No branches or pull requests

2 participants