For Each Row
Summary: Process of opening a data table, matching batch values, and setting the batch data type to numeric.
Code:
dt = Open("data_table.jmp");
For Each Row( dt, dt:batch = Match( dt:batch, "small", "1", "large", "2" ) );
dt:batch << Set Data Type( "Numeric" );
Code Explanation:
- Open table.
- Loop through each row.
- Match batch values.
- Replace "small" with "1".
- Replace "large" with "2".
- Set batch data type.
- Convert to numeric.