hello
I would like to rename 3 tables and I tried to use a for loop as below, but without results so far.
Does anyone get any idea?
tb_list = {"SPC_tb", "SPEC_tb", "Data_tb"};
dtt = Data Table(tb_list[1]) << Get Selected;
For( k = 1, k < 4, k++,
dtt = Data Table( eval(tb_list) << Get Selected[1] );
name_list = dtt << get column names();
column_name_tb = New Table( "xx_temp_name_table" );
column_name_tb << New Column( "name", Character, Set Values( name_list ) );
column_name_tb << New Column( "rename", formula( "rule" || :name ) );
rename_list = Column( column_name_tb, "rename" ) << getValues;
For( i = 1, i < N Col(dtt) + 1, i++,
Eval( Column( dtt, i ) << set name( rename_list ) )
)
);
Lionel