JMP and R Integration: moving equations back and forth between JMP and RFirst, I want to plug @ruthhummel awesome new paper on R and Python Integration : http://sww.sas.com/cosmos/viewAsset?id=111094
JMP and Open Source Whitepaper Now Available: Using JMP and JMP Pro with Python and R
And now the questions:
I have a customer that wants to move equations in and out of JMP from R. They do NOT have JMP Pro (so the Formula Depot is not an option). I showed them how to use the Formula Editor, saving formulas out of Fit Model, etc. but they are wanting something more automated and integrated with R (they are fairly sophisticated JMP users). Does anyone have an answer to the following:
- How do we get equations into JMP from R?
- (1.2, really) Can we get columns or variables auto-generated when we bring equations into JMP because we want to simulate on these equations in the profiler?
- How do we get equations out of JMP into R (without Pro and Formula Depot- so this is a work around beyond scraping the JSL out of the formula column).
THank you!
Re: JMP and R Integration: moving equations back and forth between JMP and RFair statement Ian, I know Roche is using Shiny as well.
However, though R is famous within a statistical environment, Python is a more general-purpose language with a readable and object oriented syntax. Therefore the usage increased over the years so that R is behind Python. The popularity index shows that nicely.

As well the TIOBE Index for the programming language of the year: https://www.tiobe.com/tiobe-index/ (for 2020 Python #3 after C and Java, R #18). There are other metrices in the web showing that more people switch from R to Python than vice versa.
All that does not mean R will go away some time, I believe it will stay as Java, C, Python for a long long time and will have its community. If they make it into production environment with shiny in a similar way as Python it might be worth considering the code generation, as the demand on this will increase.
Re: JMP and R Integration: moving equations back and forth between JMP and RPerhaps off topic, but although the statement 'R is usually not used in production mode as it is much more work than in Python to create the interfaces' might be true in general, it's easy to find counterexamples:
"Shiny is the most popular framework among R users for developing dashboards and web applications. It is commonly used by statisticians and data scientists to present and share their work with broader groups. These dashboards are often developed inside the RStudio IDE and then published to hosting servers. RStudio IDE users have been enjoying the power of Databricks clusters and other workspace features since 2018. Now they can use Shiny on Databricks as well.
In this latest Data Science Central webinar, we will review how RStudio Server works on Databricks clusters and the advantages of running RStudio Server inside the Unified Data Analytics Platform. We will introduce a new addition to the Unified Platform for R users on Databricks: support for Shiny applications. This webinar will include a demo that will focus on the lifecycle of developing and testing Shiny applications inside hosted RStudio Server, as well as what can be done with a high-bandwidth connection to a powerful Apache Spark cluster".
Of course a single webinar doesn't represent a strong market presence, but perhaps it does serve to underline the importance of the question @Daniel_Valente asked earlier in the thread.
Re: JMP and R Integration: moving equations back and forth between JMP and RHi Laura,
adding to what was said already:
1. Formula Depot:
Usually you want to autogenerate code from those model formulas to use them in productive environments. These are often web- or database-based, therefore we offer C++, JavaScript, SQL and Python (besides SAS). R is usually not used in production mode as it is much more work than in Python to create the interfaces. So as Dan asked - what would be there use case to add R code generation to the Formula Depot?
2. Generating R code from JMP Formulas via automated scripts:
To make this happen you need to transfer the JMP syntax to R syntax for both the column variables as the operations. This can be scripted, but is cumbersome. Not just to remove the colon : but also initializing the variables might need some real good understanding and I'm not sure this is easy to generalize for different kind of models. I stepped away from trying it due to time constraints and value constraints.
However you might be able to extract the formula from the report as a string after you display it in the report. This should not have the colon operator in it. Then send this formula to R in a variable and use it from there using R code functionality. Not sure if this will work out as I haven't tested.
3. Getting R models into JMP via automated scripts:
More or less the same as in 2, though you need to check if you could send the formula somehow as string to JMP. then you would have to modify the string to a formula JMP can work with using e.g. expressions and concatenations.Of course one could build up a GUI interface where you import the R formula as string, set the elements of the string to roles as e.g. columns, operators, ... and create a JMP formula which then can be used in the profiler. However this seems to be too much work for the value you gain. Another approach could be: if the formula string in R has e.g. blanks between operators and variables, you could automatically read the string, use regular expressions to add colons to the strings but not the operators and you might be fine.
4. Regarding JMP Pro:
I do not see JMP Pro in danger due to Formula depot because this is not functionable with R, so there is no reason to buy Pro just for the Formula Depot. There is no benefit.
Another topic are building models to compare and interprete them. They might stick to the methods in R because they do not want to buy Pro. OK. However they might want to use alternative models in R not availanble in JMP Pro, and compare them there due to the better interpretation with the profiler. I can imagine NN with many more hidden layers, deep learning and others (though nowadays I would use Python and/or MATLAB if I want to do reinforcement learning or deep learning). I can also imagine some specialized methods tailored to specific problem statements or stochastic simulation models like GARCH or ARMAX for timeseries forcasts and econometrics (something we would have to rely on SAS routines). BUT, this is where, again, it would be important to understand what they do want to achieve and what they cannot if they stay as it is! If there is a big business value they might find a consultant implementing this formula converter for them. Without a biig business value I doubt anyone would touch it.
Re: JMP and R Integration: moving equations back and forth between JMP and RCompletely agree Ian, I am new to the JMP team but one way I clearly position JMP and JMP Pro for sale is whether the user will be stepping away from the GUI and interacting with the "nuts and bolts". I think Formula Depot is correctly situated within JMP Pro because of move from primarily GUI-based activity.
Re: JMP and R Integration: moving equations back and forth between JMP and RWhat is the specific problem they are trying to solve, @Laura_Higgins? There is an open DEFECT for adding R code generation, but we've not had specific examples of customers putting models into production in R. With the customer name and more information, we can update the DEFECT.
Re: JMP and R Integration: moving equations back and forth between JMP and RI understand every case is different. But, stating the obvious perhaps, in general I don't think it's good for us to show how one can avoid serious consideration of the merits of JMP Pro by offering workarounds.
Re: JMP and R Integration: moving equations back and forth between JMP and RThough not the answer to all your questions, but to be clear: Formula Depot does not generate R code, just Python, SAS, JavaScript, C++, and SQL. So Pro is not an option either.