How to subset top 10 highest values by year and location?I have a dataset of daily ozone concentrations from multiple sites over several years. Is there a quick way to subset the top ten highest concentrations at each site and year?
Advanced Statistical ModelingData Blending and CleanupRe: How to subset top 10 highest values by year and location?Here is an example of a simple way to create a table with just the top 10 for each group(site)

names default to here(1);
dt=// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << sort(by(:sex, :height), order(descending,descending), replace table(1));
dt<< select where(col cumulative sum(1, :sex) <=10);
dtFinal = dt << subset(output table("Top 10"), selected rows(1), selected columns(0));Re: How to subset top 10 highest values by year and location?You can create formula to get top10, use summary or tabulate. And then depending on how your data looks like you might need additional calculation to easily get the top10
Re: How to subset top 10 highest values by year and location?Hi, I am very happy to learn about "select where(col cumulative sum(1, :sex) <=10)".
I am wondering if I can push it further, say if I want to select top 5 for male, and top 7 for female? Many thanks in advance.
Re: How to subset top 10 highest values by year and location?dt << select where( Col Cumulative Sum( 1, :sex ) <= Match( :sex, "M", 5, 7 ) );