Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- JMP and R

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

JMP and R

Sep 14, 2011 6:03 AM
(2192 views)

Hello,

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 ?

thanks...

3 REPLIES 3

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

JMP and R

Hi:

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 );*

);

R Init();

R Send(xmat);

R Submit("

mean_x <- mean(xmat);

");

mean_x = R Get(mean_x);

R Term(); // done with R for now;

Show(mean_x);

Caption( "R Calculated Mean = " || char(eval(mean_x)) );

// For more dialog examples - see Murphy and Lucas, "Jump into JMP Scripting" - great book.

Best regards,

-Matt

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

JMP and R

Hello,

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 ?

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

JMP and R

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.

-Jeff

-Jeff