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
anandk
Level II

Corresponding Row for a Column Minimum

I am trying to find a corresponding row for a column Minimum "DEF" and trying to do that by column "GHI"?

I am able to find the Column Minimum for "DEF" but I am not getting the corresponding row value for column "ABC"?

 

I am using the following piece of code:

 

dt = current data table();
dt<<newColumn("BestB",numeric,continuous,Format("Best"),Formula(x = col minimum(:DEF,:GHI);));

dt<<newColumn("BestO",numeric,continuous,Format("Best"),Formula(rmat = dt << get rows where(:DEF == x);
r = rmat[1];
y = :ABC[r];));

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Corresponding Row for a Column Minimum

See if this code provides you what you want

dt = Current Data Table();
dt << New Column( "BestB", numeric, continuous, Format( "Best" ), Formula( Col Minimum( :DEF, :GHI ) ) );
dt << New Column( "BestO",
	numeric,
	continuous,
	Format( "Best" ),
	Formula(
		dt=current data table();
		GHIValue = :GHI;
		:ABC[(dt<<get rows where( GHIValue == :GHI & :DEF == :BestB ))[1]];
	)
);
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Corresponding Row for a Column Minimum

See if this code provides you what you want

dt = Current Data Table();
dt << New Column( "BestB", numeric, continuous, Format( "Best" ), Formula( Col Minimum( :DEF, :GHI ) ) );
dt << New Column( "BestO",
	numeric,
	continuous,
	Format( "Best" ),
	Formula(
		dt=current data table();
		GHIValue = :GHI;
		:ABC[(dt<<get rows where( GHIValue == :GHI & :DEF == :BestB ))[1]];
	)
);
Jim
anandk
Level II

Re: Corresponding Row for a Column Minimum

Thank you that worked for my script

Recommended Articles