cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

reading data from peak - y and x data

Hi,

I am having JMP 18 and I am looking for a way to read the max peak - I´d like to have the max y and equivalent x value. 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: reading data from peak - y and x data

It requires just a simple modification to the JSL I originally provided.

txnelson_0-1744383092843.png

names default to here(1);
dt = current data table();

// Find all of the peaks
theRows = (dt << get rows where(col max(:signal, :ID)==:signal));

// Display results
New window("Peak Maximums",
	table box(
		string col box("ID", :ID[theRows]),
		number col box("time, min",:"time, min"n[theRows]),
		number col box("signal", :signal[theRows])
	)
);

// Select the rows in the data table
dt << clear select;
dt << select rows(theRows);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: reading data from peak - y and x data

Here is a simple script that will write the values to the log

names default to here(1);
dt = current data table();

theRow = (dt << get rows where(col max(:signal)==:signal))[1];
show(:"time, min"n[theRow],:signal[theRow]);
Jim
katjes
Level I

Re: reading data from peak - y and x data

hi, thanks for the great input.

 

Is there away that it does the data picking for all IDs?

txnelson
Super User

Re: reading data from peak - y and x data

It requires just a simple modification to the JSL I originally provided.

txnelson_0-1744383092843.png

names default to here(1);
dt = current data table();

// Find all of the peaks
theRows = (dt << get rows where(col max(:signal, :ID)==:signal));

// Display results
New window("Peak Maximums",
	table box(
		string col box("ID", :ID[theRows]),
		number col box("time, min",:"time, min"n[theRows]),
		number col box("signal", :signal[theRows])
	)
);

// Select the rows in the data table
dt << clear select;
dt << select rows(theRows);
Jim

Recommended Articles