GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Use R startup options for Rscript and avoid saving workspace by vboerchers · Pull Request #68 · jbytecode/rcaller

Conversation

@vboerchers

@vboerchers vboerchers commented Sep 9, 2022

Copy link
Copy Markdown
Contributor

My R scripts, which I started with RCaller.runOnly(), failed when run in a kubernetes container since R wanted to save the workspace in .RData but the PWD is read-only.

Problem 1: RProcessStartUpOptions are not used by Rscript

Following the RCaller documentation I assumed that the option --vanilla was used, but this was not the case. I added the rCallerOptions.getStartUpOptionsAsCommand() to the Rscript command since it understands all R options too.

Problem 2: RCaller.runOnly adds q("yes")

This overrides whatever the startup options may be. I changed that to q() which lets the startup options decide so adding --save leads to saving the workspace.

Workaround

I could work around the problem by adding a q("no"), which makes the q("yes") be ignored.

Tests

Which tests would you propose? Would it be sufficient to add an assertion to an existing test RCallerTest or should I add another test case or even class?

Error message in container

com.github.rcaller.exception.ExecutionException: R command evaling /tmp/rCaller9166028389620470667 failed with error. Reason: Error in gzfile(file, "wb") : cannot open the connection
Calls: sys.save.image -> save.image -> save -> gzfile
In addition: Warning message:
In gzfile(file, "wb") :
  cannot open compressed file '.RDataTmp', probable reason 'Permission denied'

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
vboerchers added 3 commits September 9, 2022 17:32
@vboerchers
Fix typos
01371b0
@vboerchers
Use R StartUpOptions for Rscript too
8ac8776
@vboerchers
Do not overwrite --save/--no-save by q("yes")
160eece
@jbytecode
jbytecode merged commit 67f379e into jbytecode:master Sep 10, 2022
@jbytecode

jbytecode commented Sep 10, 2022

Copy link
Copy Markdown
Owner

thank you!

vboerchers reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vboerchers

vboerchers commented Sep 11, 2022

Copy link
Copy Markdown
Contributor Author

That was fast, thank you for the merge :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@vboerchers @jbytecode
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.