Apologies for how basic my question is, I am just starting to use JMP for the first time.
I have a massive dataset (14 columns x 20,000 rows) and I am trying to write a script that will identify and delete all rows that that do not have either a 0 or 1 for a specific range of columns (columns 4-14). This dataset is from an even larger dataset, so there are some rows in my subset that are completely empty. Here's an example of what I was hoping to do:
- - - - -
0 0 1 - 0
- - - - -
1 - - - -
becomes:
0 0 1 - 0
1 - - - -
I've started writing the code, but I'm stuck–I'm not sure what to do after the For Each Row. I was hoping that this script would look at one row at a time, and if a particular cell did not have a 0 or a 1, it would look for a 0 or a 1 in the next column, and if it got to the end of the row with no 0s or 1s, then it would delete that entire row. Here is my code so far:
dt=Open("File Name")
colnames = dt << get column names( numeric,string );
For( i = 4, i <= N Items( colnames ), i++,
For Each Row(If(:colnames != 0 | :colnames != 1), Continue()
)
);
I was thinking about using
<< Delete Rows
, which I've seen on some other questions on this forum. If this is too complicated with a script, is there a better way to do this?