This is a collection of scripts that can be used to illustrate the new Python integration in JMP 18 and how that Python Integration can be used along with R. Feel free to repost with any other examples you might have that worked well for a customer presentation. Thanks to all who helped develop these examples including Kemal Oflus, Sam Gardner and Paul Nelson.
For more examples of using the new Python integration that do not involve R, see this companion post:
C80 JMP Python Use Cases
**************************************************************************************************
Bootstrap R (old integration).jsl
- This is an example of the old R Integration (which still works in JMP 18) using a JSL script.
- The example uses R to generate a random sample of 50 observations. Then a 500 sample bootstrap of the median statistic is generated.
- The bootstrap data is plotted in R.
- The bootstrap data is sent to JMP and a Distribution report is generated.
- The R generated plot is shown side-by-side with the JMP Distribution report for comparison.
**************************************************************************************************
Bootstrap R (rpy2).py
- Interacting with R through the new Python Integration.
- Running an R commands using rpy2.
- Passing data: R dataframes + Python dataframes + JMP Tables.
- Using run_jsl() to invoke the Distribution platform.
**************************************************************************************************
Bootstrap R (Rscript).py
- Interacting with R through the new Python Integration.
- Running an R script from an external file.
- Using Rscript feature of Python.
- Passing data: R dataframes + Python arrays and dataframes + JMP Tables.
- Using run_jsl() to invoke the Distribution platform.
- Printing standard output generated by R to the log window.
**************************************************************************************************
Bootstrap R (Rserve).py
- Interacting with R through the new Python Integration.
- Running an R through a connection to Rserve.
- Creating JMP tables and writing to them directly in memory.
- Passing data: R dataframes + Python dataframes + JMP Tables.
- Using run_jsl() to invoke the Distribution platform.
**************************************************************************************************
Clinical R (rpy2 method).py
- Interacting with R through the new Python Integration.
- Running an R commands using rpy2.
- Selectively installing what R packages need to be installed (pythonic approach).
- Using haven to generate SAS Transport files.
- Working with an example clinical data set (many specialized files) from Pharmaversesdtm.
**************************************************************************************************
Rserve_Simple.py
- Interacting with R through the new Python Integration.
- Running an R through a connection to Rserve.
- A similar example as Bootstrap R (Rserve).py but more simple.
**************************************************************************************************