cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
Thierry_S
Super User

JMP 19.0.4 Windows > How Do I Convert JMP 17 script that include R functions (some deprecated)

Hi,

I have a couple of simple scripts that call R functions I created in JMP 17. I upgraded JMP to its latest version (19.0.4), and these scripts no longer work. The documentation is a bit thin about the integration of R into the Python environment, so your help would be highly appreciated.

Names default to here (1);

dt = current data table ();

nw = New Window ("ENSEMBL_ID COLUMN SELECTION",
		<< Modal,
		Text Box ("Select the ENSEMBL_ID column"),
		lcol = Col List Box (Data Table (dt),
							All,
							width (500)
							),
		Button Box ("OK", scol = lcol << get selected; switch = 1),
			
		Button Box ("CANCEL", switch = 0; Throw(1)),					
							
		);


If (switch, 
	enbl_col_list = as column (scol) << get values ();
	r init();
	R send (enbl_col_list);
	R Submit(	"\[library(biomaRt)
					library("org.Hs.eg.db")
					library("AnnotationDbi")
					output <- mapIds(org.Hs.eg.db, keys = enbl_col_list, keytype = "ENSEMBL", column = "SYMBOL")
					output_df <- as.data.frame (output)
					print(output_df)
					]\");
	
	dt_out = r get (output_df);
	R Term (),
Throw (1));

Thank you.

Best,

TS

Thierry R. Sornasse
3 REPLIES 3
hogi
Level XIII

Re: JMP 19.0.4 Windows > How Do I Convert JMP 17 script that include R functions (some deprecated)

Here is a great introduction to R in JMP 19: 
Scripters Club Recording: R is Back Again in JMP 19 - Exploring R and Python Integration 

seems that the code doesn't have to be adjusted.
Just install R and from R install the libraries which are used in the R command.

Then execute the JSL code - and JMP will control R via Python / rpy2

Thierry_S
Super User

Re: JMP 19.0.4 Windows > How Do I Convert JMP 17 script that include R functions (some deprecated)

Hi Hogi,

Thanks for your feedback. It's odd, on my system, the script crashes without producing any output.

I'll check my R configuration to make sure that I have the right package installed.

Best,

TS 

Thierry R. Sornasse
Thierry_S
Super User

Re: JMP 19.0.4 Windows > How Do I Convert JMP 17 script that include R functions (some deprecated)

Hi JMP Community,

I found the issue in my script. I needed to include an UNLIST(data) R command to convert the JMP list into a string VECTOR so the main command would work.

Best,

TS

Thierry R. Sornasse

Recommended Articles