Hello,
I have a data table (in attachment) with the first column (COD CAMP) that is always the same but the other columns can be different in different tables (different number and different names). I want to script the categorical analysis of the other columns vs. COD CAMP. In this way may analysis will work whatever the data table is (of course it must contain COD CAMP). I tried the following jsl code with several variants but without success. Can anyone help? Many thanks.
dt3 = Current Data Table();
n3 = dt3 << Get Column Names();
Show( n3 );
lstColNames_n3 = dt3 << Get Column Names();
Show( lstColNames_n3 );
Show( lstCols_n3 );
lstCols_n3 = {};
For( i = 1, i <= N Items( lstColNames_n3 ), i++,
colName = lstColNames_n3[i];
col = Column( dt3, i );
Insert Into( lstCols_n3, col );
);
Show( lstCols_n3 );
For( i = 1, i <= N Items( lstColNames_n3 ), i++,
colName = lstColNames_n3[i];
col = Column( dt3, colName );
Insert Into( n2, col );
);
dt3 << New Script(
"Categorical by COD CAMP",
Categorical( X( :COD CAMP ), Responses( Eval( n2 ) ), Legend( 0 ) )
);