cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar

split data table without including excluded data

Hello all,

 

I am trying to split a data table that has some bad data in it. I have exleded those bad data in the original table, but I don't know why those data are showling up in split table.

 

My script is bellow:

dt_daily << New Column( "Outliers Exclusion", Numeric, Continuous, Formula( If( :Mahal. Distances > 1.96, 0, 1 ) ), eval formula );

dt_daily << select where( :Outliers Exclusion == 0 ) << exclude;
Wait( 0 );
dt_dailysplit = dt_daily << Split( Split By( :EquipmentName ), Split( :Energy % from Controls ), Remaining Columns( drop all ) );
Wait( 0 );

 

dt_daily  is the original table, you can see that I did some exculsion over there. 

dt_dailysplit is the new split data table

 

6 REPLIES 6
txnelson
Super User

Re: split data table without including excluded data

The Split platform appears to not support the "Excluded" state.  You will need to either delete the rows, or select the nonexcluded rows and then subset them to a new data table, and then split that data table.

Jim

Re: split data table without including excluded data

Thank you for your prompt reply Jim. I will follow your suggestion. 

Re: split data table without including excluded data

Hello Jim,

 

I don't want to delete these data and am tring to subset them into a new table. Could you please give me some help on script part for select ing nonexcluded rows and then subset them to a new data table? 

 

Thanks you so much!

Winnie

txnelson
Super User

Re: split data table without including excluded data

Here is a simple example:

Names Default To Here( 1 );
dt = Current Data Table();

dt << select where( Excluded( Row State() ) == 0 );

dtSub = dt << subset( selected rows( 1 ), selected columns( 0 ) );

To learn about how to set and use the various RowState capabilites, see the secion on Row States in the Scripting Guide

     Help==>Books==>Scripting Guide

Jim

Re: split data table without including excluded data

It is super helpful for me! Thanks again!

hogi
Level XI

Re: split data table without including excluded data

Related wish:
Handling Hidden / Excluded rows / columns in Table-handling 

 

@MShroff wrote:

When using the Table-processing commands, it would be helpful to provide checkboxes in the dialog to determine how to handle hidden / excluded rows or columns. In particular, this is problematic with splitting tables.