Selecting Column By Modeling Type in JSLHello,
I am trying to perform the following actions on a data table:
Add a row >> Select all Columns Based with Numeric Data Type >> Add a "0" to the New Row in all of these columns >> Add Equal Number of New Columns at End of the Data table as those selected >> Insert Formula into the New Columns Created >> Rename New Columns Based of Formula Reference Column.
The biggest issue I am having at this point in selecting the columns based on Modeling Type or Data Type.
The purpose of this is to remove duplicate values in columns base on value in the previous row. The parameters being analyzed in project maintain the same value until a new analysis is called for. This creates scatter plots with "plateaus" due to the repeating values. I am trying to eliminate the plateauing to better overlay trends from multiple parameter measurements. Any help would be greatly appreciated. Thanks.
Data Exploration and VisualizationRe: Selecting Column By Modeling Type in JSLThis snippet selects the numeric columns:
names default to here(1);
dt= open("$SAMPLE_DATA\Big Class.jmp");
dt << select columns(dt << get column names("Numeric"));Re: Selecting Column By Modeling Type in JSLGive this a shot:
Names Default to Here( 1 );
dt = Current Data Table();
dt << Add Rows( 1, At Start );<BR />
For( i = 1, i <= N Cols( dt ) , i++,
If( Column( i ) << Get Data Type() == "Numeric",
Column( i )[ 1 ] = 0
)
)
Does this handle the part you're struggling with?