I wrote a micro-service that will do lots of R stuff from FMP. So, it's doable! I got working, from FMP, t-tests, correlation, Poisson, and some descriptive statistics, for example.
You need to have the RServe server running however for that to work.
The flow goes like this:
FileMaker <---> MicroService (Java) <--> Rserve
So basically it's Java and R working together.
For real stat analysis, given how incredible the FREE RStudio is, I generally do stat analysis directly in R. I recently did a mixed-ANOVA study and wouldn't consider FileMaker being in the mix for that level project at all -- even with a micro-service.
Additionally, I found that some of the "results" data structures R passes back are not homogeneous making the work in Java much harder than it needs to be. Again, doable, however.
HOPE THIS HELPS.