cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
DLC7JMP
New Member

Send Expects Scriptable Object in access or evaluation of 'Send' ,

Good Afternoon,

    I get this or similar error when trying to "write". "Record" or "save" data output

Send Expects Scriptable Object in access or evaluation of 'Send' , G << /*###*/
'Send' , G << /*###*/Save( "/homedirectory/Drug_test.txt" ) /*###*/

 

As an example I used Fitmodel example (below) for "Drug.jmp", which is a JMP example file. 

dt = Open( "$SAMPLE_DATA/Drug.jmp" ); obj = dt << Fit Model( Y( :y ), Effects( :Drug, :x ), Personality( Standard Least Squares ), Emphasis( Minimal Report ), Run ); G = obj << Get Effect PValues; Show( G ); //values show in log G << Save( "/homedirectory/Drug_test.txt");// I get the error message:Send Expects Scriptable Object in access or evaluation of 'Send' , G << /*###*/
// 'Send' , G << /*###*/Save( "/homedirectory/Drug_test.txt" ) /*###*/ // also did not work G<<savetext("/homedirectory/G.txt")

What am I doing wrong?

DLC7JMP

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Send Expects Scriptable Object in access or evaluation of 'Send' ,

What are you trying to save in this case? If you wish to save the results into a text file, you have to use Save Text File

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Drug.jmp");

obj = dt << Fit Model(
	Y(:y),
	Effects(:Drug, :x),
	Personality(Standard Least Squares),
	Emphasis(Minimal Report),
	Run
);
G = obj << Get Effect PValues;

Save Text File("$TEMP/drugtest.txt", Char(G));

Web("$TEMP/drugtest.txt"); // should open in default .txt application

So in this case you are using sending incorrect message to a matrix.

-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Send Expects Scriptable Object in access or evaluation of 'Send' ,

What are you trying to save in this case? If you wish to save the results into a text file, you have to use Save Text File

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Drug.jmp");

obj = dt << Fit Model(
	Y(:y),
	Effects(:Drug, :x),
	Personality(Standard Least Squares),
	Emphasis(Minimal Report),
	Run
);
G = obj << Get Effect PValues;

Save Text File("$TEMP/drugtest.txt", Char(G));

Web("$TEMP/drugtest.txt"); // should open in default .txt application

So in this case you are using sending incorrect message to a matrix.

-Jarmo
DLC7JMP
New Member

Re: Send Expects Scriptable Object in access or evaluation of 'Send' ,

Thank you.  This works fine.  

Would you care to address why this test loop only open "analysis" windows with out "Y" variables?

This is a test for only 3 columns of data.  My goal is to run this on 4,500 columns and store the two p-values for each analyses.  

 

// Open file

dt = Open("home/AND_Counts_alphaorder_SumNorm.jmp");

 

// Define the range of response columns

startColumn = 31;

endColumn = 33;

 

// Loop over the response columns

for (col = startColumn, col <= endColumn, col++,

    responseVar = Column(dt, col) << Get Name;

 

obj = dt << Fit Model(

Y( responseVar ),

Effects( :mass, ::Accl_Temp_ordinal ),

Personality(Standard Least Squares),

Emphasis(Minimal Report),

Run),

);

P = obj << Get Effect PValues;

Save Text File("~/Projects_AB/Ptest.csv", Char(P));

// This open 3 windows w/out "Y"