I have look into rJava and checked out a video on RCaller, but in all examples I saw people are only calling native R functions. I have found no way of loading a *.r file and using its content.
The main question is: How to integrate a custom Rscript in Java, so that I can call my custom-made R functions through java?
The thing that I want to do is to create a simple GUI with images loaded from folders, buttons and be able to call my custom R functions on click and dynamically swapping images depending on outcomes(the logic would be in R).