I saw that people connect R and JMP, and build graphical interfaces for R via JMP, in other words, for some R procedure, they build a GUI like interface that allow to drage variables in the JMP superb style.
How do I do it ? I read a bit about how to connect R to JMP from JSL, but how do I create this GUI, let's say for a very simple procedure, for example, if I have a variables X and Y, and I want to perform: mean(x), how to I build a GUI that does that ?
A simple example:
dt = Open("SAMPLE_DATA/Big Class.jmp");
coldlg = column dialog("Test R Connection",
response = collist("Var", data type(numeric), min col(1) )
If(coldlg["buttun"]==-1, throw("User Canceled"));
colnames = coldlg["response"];
xmat = ;
for(i=1, i<=nitems(colnames), i++,
xmat = xmat || (column(colnames) << get as matrix );
mean_x <- mean(xmat);
mean_x = R Get(mean_x);
R Term(); // done with R for now;
Caption( "R Calculated Mean = " || char(eval(mean_x)) );
// For more dialog examples - see Murphy and Lucas, "Jump into JMP Scripting" - great book.
I have tried the sample code, the data table opened indeed and so did the dialog box, but when I pressed "Ok", nothing happened...
I suspect a problem with the R connection. Does it also work on 64 bit systems ?
Yes, the connection to R works with 64-bit systems.
Please check the Log window in JMP for any errors after submitting the sample code.