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.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lala
Level IX

How does JSL implement the sorting of memory arrays?

Thanks!

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
ar = dt << GetAsMatrix( {2, 4} );
ar << Sort( By( 1 ), Order( Descending ), replace table );//??
  • Of course, this code is just a try.

1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: How does JSL implement the sorting of memory arrays?

You might find something in Sorting Lists  useful. The Rank() function is often overlooked.

Craige

View solution in original post

2 REPLIES 2
jthi
Super User

Re: How does JSL implement the sorting of memory arrays?

You can sort vectors and lists but I'm not sure if you can sort matrix by specific column. But you can always convert that matrix to private table, sort it and get it back into matrix.

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
ar = dt << GetAsMatrix({2, 4});

dt_m = As Table(ar, <<private);
dt_m << Sort(By(1), Order(Descending), Replace Table);

ar1 = dt_m[0,0];
Close(dt_m, no save);

show(ar, ar1);
-Jarmo
Craige_Hales
Super User

Re: How does JSL implement the sorting of memory arrays?

You might find something in Sorting Lists  useful. The Rank() function is often overlooked.

Craige

Recommended Articles