cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

Solve problems, and share tips and tricks with other JMP users.
%3CLINGO-SUB%20id%3D%22lingo-sub-607978%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EIs%20there%20a%20bug%20in%20%22R%20Get()%22%20for%20a%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-607978%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EWith%20my%20version%20of%20JMP%20(17.0.0)%20and%20R%20(4.2.2)%2C%20I%20cannot%20get%20list%20variables%20back%20from%20R%20with%20the%20command%20%22R%20Get()%22.%20I%20find%20the%20error%20message%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%3CP%3EError%3A%20Error%20in%20if%20(is.na(datam))%20%7B%20%3A%20the%20condition%20has%20length%20%26gt%3B%201%3CBR%20%2F%3EUnexpected%20errors%20occurred%20while%20attempting%20to%20transfer%20the%20data.%3CBR%20%2F%3EGet%20data%20for%20%22x1%22%20failed%3C%2FP%3E%3C%2FBLOCKQUOTE%3E%3CP%3EHere%20is%20a%20minimal%20example%20to%20reproduce%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3CCODE%20class%3D%22%20language-jsl%22%3ENames%20Default%20To%20Here(%201%20)%3B%0AR%20Init()%3B%0Ax1%20%3D%20%5B1%2C%202%2C%203%5D%3B%0AR%20Send(%20x1%20)%3B%0A%0AR%20Submit(%22%0A%20print(x1)%0A%20print(typeof(x1))%3B%0A%20%22%0A)%3B%0Ax2%20%3D%20R%20Get(%20x1%20)%3B%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-607978%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EScripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-608022%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3ERe%3A%20Is%20there%20a%20bug%20in%20%22R%20Get()%22%20for%20a%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-608022%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EI%20am%20running%20Windows%2011%2C%20JMP%2017%20and%20R%204.1.3%20and%20the%20code%20runs%20without%20error%3C%2FP%3E%0A%3CPRE%3E%2F*%3A%0A%2F%2F%3A*%2F%0ANames%20Default%20To%20Here(%201%20)%3B%0AR%20Init()%3B%0Ax1%20%3D%20%5B1%2C%202%2C%203%5D%3B%0AR%20Send(%20x1%20)%3B%0A%0AR%20Submit(%22%0A%20print(x1)%0A%20print(typeof(x1))%3B%0A%20%22%0A)%3B%0Ax2%20%3D%20R%20Get(%20x1%20)%3B%0A%2F*%3A%0A%0A%20%20%20%20%20%5B%2C1%5D%0A%5B1%2C%5D%20%20%20%201%0A%5B2%2C%5D%20%20%20%202%0A%5B3%2C%5D%20%20%20%203%0Aattr(%2C%22name%22)%0A%5B1%5D%20%22x1%22%0Aattr(%2C%22class%22)%0A%5B1%5D%20%22matrix%22%0Aattr(%2C%22DataType%22)%0A%5B1%5D%201%0Aattr(%2C%22ModelingType%22)%0A%5B1%5D%201%0Aattr(%2C%22JMPName%22)%0A%5B1%5D%20%22x1%22%0Aattr(%2C%22RName%22)%0A%5B1%5D%20%22x1%22%0A%5B1%5D%20%22double%22%0A%5B1%2C%202%2C%203%5D%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-608070%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ERe%3A%20Is%20there%20a%20bug%20in%20%22R%20Get()%22%20for%20a%20list%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-608070%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%3CP%3EThis%20is%20a%20known%20issue.%20Please%20refer%20to%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2FJMP-Knowledge-Base%2FJMP-Get-Data-for-x-fails-using-R-4-2-x-and-later%2Fm-p%2F575481%23U575481%22%20class%3D%22lia-mention-container-editor-message%20lia-img-icon-tkb-thread%20lia-fa-icon%20lia-fa-tkb%20lia-fa-thread%20lia-fa%22%20target%3D%22_blank%22%3EJMP%C2%AE%20Get%20Data%20for%20x%20fails%20using%20R%204.2.x%20and%20later%3C%2FA%3E.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Choose Language Hide Translation Bar
bayesfactor1
Level II

Is there a bug in "R Get()" for a list?

With my version of JMP (17.0.0) and R (4.2.2), I cannot get list variables back from R with the command "R Get()". I find the error message:

Error: Error in if (is.na(datam)) { : the condition has length > 1
Unexpected errors occurred while attempting to transfer the data.
Get data for "x1" failed

Here is a minimal example to reproduce:

 

Names Default To Here( 1 );
R Init();
x1 = [1, 2, 3];
R Send( x1 );

R Submit("
	print(x1)
	print(typeof(x1));
	"
);
x2 = R Get( x1 );

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Is there a bug in "R Get()" for a list?

2 REPLIES 2
txnelson
Super User

Re: Is there a bug in "R Get()" for a list?

I am running Windows 11, JMP 17 and R 4.1.3 and the code runs without error

/*:
//:*/
Names Default To Here( 1 );
R Init();
x1 = [1, 2, 3];
R Send( x1 );

R Submit("
	print(x1)
	print(typeof(x1));
	"
);
x2 = R Get( x1 );
/*:

     [,1]
[1,]    1
[2,]    2
[3,]    3
attr(,"name")
[1] "x1"
attr(,"class")
[1] "matrix"
attr(,"DataType")
[1] 1
attr(,"ModelingType")
[1] 1
attr(,"JMPName")
[1] "x1"
attr(,"RName")
[1] "x1"
[1] "double"
[1, 2, 3]
Jim

Re: Is there a bug in "R Get()" for a list?

This is a known issue. Please refer to JMP® Get Data for x fails using R 4.2.x and later.

Recommended Articles