Skip to content

Allow the ability to specify a custom temp directory - #74

Closed
eric-vlaanderen wants to merge 3 commits into
jbytecode:masterfrom
eric-vlaanderen:master
Closed

Allow the ability to specify a custom temp directory #74
eric-vlaanderen wants to merge 3 commits into
jbytecode:masterfrom
eric-vlaanderen:master

Conversation

@eric-vlaanderen

Copy link
Copy Markdown
Contributor

This allows a custom temp directory to be specified when creating the RCode object and ensures that the specified directory is used when creating a new dataframe.

Unfortunately the custom temporary directory will not be respected if RCaller and Rcode are created separately and then RCaller.setCode(rCode) is called (such as in the RService class and the example java classes).

Suggest that the RService and example usage java classes are updated to create a single RCode object (at the moment one is created with the static RCode.create() method and another is created inside the RCaller.create() method) and the RCaller.setRcode(...) method is removed - although this would likely break backwards compatibility.

the code

        RCaller caller = RCaller.create();
        RCode code = RCode.create();
...
        caller.setRCode(code);

could be replaced by either:

        RCode code = RCode.create();
        RCaller caller = RCaller.create(code);
...

or

       RCaller caller = RCaller.create();
       RCode code = caller.getRCode();
...

depending on the author's preference.

@jbytecode

Copy link
Copy Markdown
Owner

Please keep the backwards compatibility.

@jbytecode jbytecode closed this Aug 30, 2026
@eric-vlaanderen

Copy link
Copy Markdown
Contributor Author

This change does not break backwards compatibility. But if RCaller and RCode are created separately, they may not share a temp directory if a custom tempDir is specified in the RCode but RCaller.create() is used.

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

Successfully merging this pull request may close these issues.

2 participants