Hi Jim,
Thanks for the quick reply. I've tried you fix to no avail.
Here is the Log I get when I implement my script:
dtLIst =>
"{"Pvalues PBS vs PBS", "Pvalues PBS vs 741039", "Pvalues PBS vs 740410", "Pvalues PBS vs 709966", "Pvalues PBS vs 709878", "Pvalues PBS vs 709573", "Pvalues PBS vs 709547", "Pvalues PBS vs 709544"}
Cannot locate data table in access or evaluation of 'Data Table' , Data Table/*###*/(dtLIst)
at line 19 in C:\Users\sburel\Ionis\Neurology Research - Documents\Core\Neurotoxicology\Miscellaneous Research Activities\DATABASE ALL CNS DATA\Associated scripts\intermediate and toy scripts\Toy example to concatenate multiple tables with a specific string in nam.jsl "
If I use the next part of the script, here's the Log I get for dxLIst=>
"{DataTable("LogX"), DataTable("LogP"), DataTable("Pvalues PBS vs PBS"), DataTable("Pvalues PBS vs 741039"), DataTable("Pvalues PBS vs 740410"), DataTable("Pvalues PBS vs 709966"), DataTable("Pvalues PBS vs 709878"), DataTable("Pvalues PBS vs 709573"), DataTable("Pvalues PBS vs 709547"), DataTable("Pvalues PBS vs 709544"), DataTable("NT191209 7-DGE in vivo mouse single stacked")}"
The second list gets concatenated just fine but included tables I don't want. The first list (dtLIst) does not contain the "Data table ("xyz").
I suspect that I'm not using the proper syntax to tell the script to evaluate each items in the first list as a data table.
//This script to concatenate only table 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(uppercase(dt),uppercase(c)),
insert into(dtLIst, dt ))
);
print(dtLIst);
data table("LogP")<<concatenate(data table (dtLIst),"Append To First Table");
//This scripts to concatenate all the tables 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")
Maybe you'll be able to see the errors of my way
Thanks
Sebastien