Hello,
I'm trying to concatenate a bunch of tables that are generated iteratively by a process.
The name of those tables all start with the same prefix.
I can easily concatenate all the open tables but I'm unable to find the correct syntax to only concatenate those tables with a specific prefix and leave the other ones alone.
Any suggestions?
Best
Sebastien
//The first script to concatenate only tables with 'Pvalue' in the name fails
//But the dtLIst does shows the correct list of tables BUT list them without the 'data table' prefix.
// as a result, the concatenation step does not interpret them as a list of table
clear log();
Names Default To Here( 1 );
try(data table("LogP")<<close window,"");
dx=new table("LogP");
c = "Pvalues ";
dtLIst = {};
For( i = 1, i <= N Table(), i++,
dt = data table(i)<<get name;
if(contains(eval(dt),c),
insert into(dtLIst, dt ))
);
print(dtLIst);
data table("LogP")<<concatenate(data table (dtLIst}),"Append To First Table");
//This scripts to concatante all the table works
//Shows the list of table with the 'data table' prefix
Names Default To Here( 1 );
try(data table("LogX")<<close window,"");
dx=new table("LogX");
dxLIst = {};
For( i = 1, i <= N Table(), i++,
dt = data table(i);
insert into(dxList, dt );
);
print(dxLIst);
data table("LogX")<<concatenate(eval(dxLIst),"Append To First Table")