I need to use some R (r-project.org) codes to carry statistical data analysis and then generate graph report(boxplot, heat map etc) back to Filemaker. I have difficulties to do it and did not find any info online. Please help!

Thanks.

I need to use some R (r-project.org) codes to carry statistical data analysis and then generate graph report(boxplot, heat map etc) back to Filemaker. I have difficulties to do it and did not find any info online. Please help!

Thanks.

Thanks. Yes, that is the only place I found online about R and Filemaker before I posted here. My solution needs to not only pass the values back and forth, but also to be in real-time (dynamic). Once the new data is added, the R will be called to calculate and generate the graph, then Filemaker will display the results on its layout. I don't know if there is new way to do the job other than the one on the web, which was posted almost six years ago.

If you have someone that's handy with R and web programming, I would try to set up some sort of Insert from URL or web viewer return of the data based on a file of data output from FM.

Unfortunately the R program is so complex and specialized, you'll probably have difficulty finding someone that has successfully integrated it.

If Graphing is your only goal, then you might want to consider other graphing methods that have been successfully integrated to FM (IE GoogleCharts or FusionCharts).

- 1 person found this helpful
Have you tried the ODBC approach outlined at http://www.medicalnerds.com/r-and-filemaker-on-mac-os-x/...? I know that in recent versions of FM the ODBC driver has been improved significantly since that article and would seem to me to be the best solution since that will allow R to access your FM-stroed data. http://cran.r-project.org/doc/manuals/r-release/R-data.html#RODBC explains how to confiure R to access an ODBC source, so if you combine this with the FM documentation on setting up FM as an ODBC source you should be able to get your data

**into**R through this approach.If you're then after graphs from R you're likely to still need to take the approach Mike suggested of exporting these from R and importing back into FM since as far as I can see from the R documentation it doesn't really support any form of API to get data back out (other than it being able to update via ODBC tables in FM which may store R-calculated results)

- 2 people found this helpful
Hello,

For what it is worth:

**There appear to be various projects written to interface with R via programming languages that interface with FileMaker (albeit in some cases via a plugin):**- HTTP requests: http://www.omegahat.org/CGIwithR/

- PHP: http://dssm.unipa.it/R-php/?cmd=home

- Java: http://www.rforge.net/rJava/

- A TCP Connection: http://stats.math.uni-augsburg.de/Rserve/ (which apparently one can access using client libraries for various programming languages including Java)

**Of all of the above:**I'd say that perhaps the first link (

*CGIwithR*) might be the most accessible to you if you are willing to learn some of the nuts and bolts about how to perform a HTTP Post request from within FileMaker (either via a plugin, or functionality added in v.13).**The above links were found at:**http://cran.r-project.org/doc/FAQ/R-FAQ.html#R-Web-Interfaces

Good luck!

-steve

I have exactly the same question.

I'm generating lots of graphs within R, that I would like to upload into filemaker. What is the best way of doing this?

This question has been asked three years ago. Are there any updates to the answers. I'm a total newbie to FM, so any input is much appreciated!

TIA, Nadine

- 3 people found this helpful
From R, using the free FileMaker JDBC driver, I can easily access FMP data. Doing graphs at this point is simple.

**Here's a sample run (in the excellent, FREE, R-Studio):**library(RJDBC)

drv <- JDBC("com.filemaker.jdbc.Driver", "/Users/...../fmjdbc.jar")

conn <- dbConnect(drv, "jdbc:filemaker://localhost/refurb.FMP12", "admin", "")

dbListTables(conn)

dbGetQuery(conn, "select count(*) from Assessment")

dbGetQuery(conn, "select * from Assessment")

----

**OUTPUT (in R-Studio**)---

**Now, if I just modify the R script above a little, I get all that data into Vectors for further processing:**.

.

.

dbListTables(conn)

**testVector1**<- dbGetQuery(conn, "select count(*) from Assessment")**testVector2**<- dbGetQuery(conn, "select * from Assessment")**Here's the resulting R vector for "testVector2"**--

I would recommend the excellent book; "Statistical Analysis with R for Dummies". Don't be put off by the title. The book is chalked through with excellent examples.

----

As I mentioned in my first reply posting above, it's also possible (in my case using a micro-service to "bridge" FileMaker to R) to communicate with R from FileMaker. From FileMaker, I've run both descriptive statistics, T-tests, and other analysis.

HOPE THIS HELPS.

- 1 person found this helpful
Sure, glad to help.

Going from FileMaker to R, instead of the other way around, below is a simple example where, from FMP, I called R to create some Poisson statistics. The Excel Poisson values are also shown.(See: https://community.filemaker.com/message/681192#681192)

The thread referenced directly above discusses how R gets around the "factorial problem" for large occurrences. FileMaker is limited by relatively low factorials (using only the FMP factorial function) making R or Java almost a necessity for production statistical work. OTOH, in Java, you can use BigInteger to create factorials of ANY size.

If my answer was correct, please mark this thread as correct.

Feel free to write me anytime.

Thanks.

This is really vague. What is your goal? If you just need to display graphs in filemaker that were generated in R, you can use containers and export the graph from R as an image. If you need to pass the raw values back and forth, then it probably is going to be more complex. I would look for some R supported ODBC drivers and try to access the data via ESS from FileMaker.

I only know what R is because my wife and some friends are in physics. I've never heard of any sort of integration for Filemaker. Googling it I found this, which may be of some help for you:

http://www.medicalnerds.com/r-and-filemaker-on-mac-os-x/