New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.
Filtering row values that are not within a given range (JSL)
May 20, 2019 05:45 AM(4055 views)
I am trying to automate some data cleaning. I have lower and high limit values that are considered valid per column and I want to remove verything else having at the end empty values instead. I am missing:
How to clear row values once there is a selection.
How to reference a column name
If there is a better way to do it.
Names Default To Here( 1 );
dt = Current Data Table();
lower_limit = 69.636;
higher_limit = 71.482;
sel = dt << Select Where( :my_column_name>= lower_limit &
:my_column_name<= higher_limit );
sel << Invert Row Selection;
// clear rows (sel)??
/*
// Here I am trying to do the same but referencing the column. Yet it does not work.
mycol = Column("my_column_name"); // this does not work
mycol = :my_column_name; // this does not work either
sel = dt << Select Where( mycol >= lower_limit &
mycol <= higher_limit );
*/
You should look up the Function As Column(). If you want to use column values, the syntax is ref_name[], that is, left bracket, right bracket. Try the syntax below.