How to save standardized columns in a script?I like to save the standardized columns using JSL. Here are is what I had in mine and I get an error when I run the script.
dt = Current Data Table();
cc = dt << Get Column Names( Continuous ); '
ncols = N Items( cc );
For( i = 1, i <= ncols, i++,
cc << Set Selected( 0 ),
col = Column(dt,cc), Distribution( Continuous Distribution(col,Save(Standardized))) );
I appreciate your help. Thanks
Re: How to save standardized columns in a script?Thanks so much Jim.Re: How to save standardized columns in a script?Not only does the code make the display invisible but it also closes the display, thus freeing up memory
Names Default to Here( 1 );
dt = Current Data Table();
cc = dt << Get Column Names( Continuous );
ncols = N Items( cc );
For( i = 1, i <= ncols, i++,
dis = Distribution( Invisible, Continuous Distribution( Column( cc[i] ) ) );
dis << Save( Standardized );
dis << close window;
);
,
Re: How to save standardized columns in a script?Thanks Jim. How do you make the distribtions invisibile. I have quite many variables and don't want to see the histograms.
Re: How to save standardized columns in a script?Here is a modification of your code that works as you want. You need to become familiar with the Scripting Index, for it will give you the syntax and examples of how to accomplish what you want
Names Default to Here( 1 );
dt = Current Data Table();
cc = dt << Get Column Names( Continuous );
ncols = N Items( cc );
For( i = 1, i <= ncols, i++,
dis = Distribution( Continuous Distribution( Column( cc[i] ) ) );
dis << Save( Standardized );
);