Publication date: 04/12/2021


Recording Output

On Windows, if you want to record output to the graphics window, send the following R code using R Submit( ).

windows.options( record = TRUE );

Character Vectors

A JMP list of strings is not the same as an R character vector. If you send a list of strings to R, it becomes a list of strings in R, not a character vector. You can use the R function Unlist to convert it:

R Init();
X = {"Character", "JMP", "List"};
R Send( X );

/* R output is:

[1] "list"


R Submit( "class(X)" );

/* Object Y is now a character vector. The R output is:

[1] "character"


R Submit( "Y<-unlist(X)
     class(Y)" );
R Term();

Element Names

A feature of an R list (called attributes) lets you associate a name with each element of the list. You can use the name to access that element instead of having to know the position of it in the list

In the following example, the list that is created in R has two elements named x and y that are created using the List() function of R. When your bring the R list into JMP and then send it back to R, the names are lost. Therefore in R, you cannot access the first matrix using pts$x. Instead, you must use the index using pts[[1]].

R Init();
R Submit("
	pts <- list(x=cars[,1], y=cars[,2])
JMP_pts = R Get( pts );
R Send( JMP_pts );
R Submit("
	Summary( JMP_pts )
R Term();
Want more information? Have questions? Get answers in the JMP User Community (