Created
May 10, 2018 12:17
-
-
Save shelajev/974187db4d2d955c049a9f8a130f88d0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Value(value = "classpath:plot.R") | |
| private Resource rSource; | |
| @Bean | |
| Function<Double, String> getPlotFunction(@Autowired Context ctx) | |
| throws IOException { | |
| Source source = Source.newBuilder("R", rSource.getURL()).build(); | |
| return ctx.eval(source).as(Function.class); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment