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

suggestion: setting ENTRYPOINT as R or R CMD BATCH would provide better log files #36

Closed
remlapmot opened this issue Mar 17, 2021 · 3 comments

Comments

@remlapmot
Copy link
Contributor

A small point for consideration.

If you used either R or R CMD BATCH for ENTRYPOINT instead of RScript (you may have to pass some additional arguments with CMD) then your R log files would be the stdout that you see in the R Console when using R.

Currently users are recording log files using sink() and those log files are much harder to tell where a script is failing if you get an error message.

I have used a work around where my project.yaml action calls a 1 line R script which calls the script I want the nicer log file for, the 1 line R script being

system("R CMD BATCH --no-save --no-restore ./analysis/2-basic-rd.R ./logs/2-basic-rd.log")
@sebbacon
Copy link
Contributor

Thanks, noted!

@remlapmot
Copy link
Contributor Author

Closing as kept at Rscript in #123 .

@bloodearnest
Copy link
Member

I'm open for changing this, now we can easily do so. The only problem I can see is if it breaks b/w compatibility with old invocations of the R image. AFAIK, all run: commands are either r:latest script.R or r:latest -e ..., both of which I think would work with either R or Rscript.

I think we should definitely consider this for next version of R image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants