Hi,
I am a new JMP user and trying to do some auto data manipulation with JSL. As the title described, I need to
For (i=1, i <=Nitems ("directory"),i++,
1) Open one of the 25 tables;
2) Generate a summary table of the opened table;
);
3) After looping through all 25 tables, generate a concatenated table of 25 summary table.
I have done the 1st and 2nd part and looped them. But not sure how to automatically concatenate the resulted 25 summary tables. Now I concatenating them manually after all tables are generated.
The lack of the knowledge is how to name each summary table and refer to them when need to concatenate them.
Also, it would be good if the script can close all opened tables (from part 1)) and summary tables (from part 2)), only return the concatenated table. (With my script, it would pop out 50 tables in total, and I have to manually close them.)
Attached my scripts:
Set Default Directory( "E:\Test" );
files = files in directory ("E:\Test");
For(i = 1, i <=N Items(files), i++,
Open(
files[i],
Worksheets( "worksheet1" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
Create Concatenation Column( 0 ),
Worksheet Settings(
1,
Has Column Headers( 1 ),
Number of Rows in Headers( 1 ),
Headers Start on Row( 1 ),
Data Starts on Row( 2 ),
Data Starts on Column( 1 ),
Data Ends on Row( 0 ),
Data Ends on Column( 0 ),
Replicated Spanned Rows( 1 ),
Replicated Spanned Headers( 0 ),
Suppress Hidden Rows( 1 ),
Suppress Hidden Columns( 1 ),
Suppress Empty Columns( 1 ),
Treat as Hierarchy( 0 ),
Multiple Series Stack( 0 ),
Import Cell Colors( 0 ),
Limit Column Detect( 0 ),
Column Separator String( "-" )
)
);
New Column ("Xindex", Formula(Ceiling(:Name("X")/:Name("dimensionX"))));
New Column ("Yindex", Formula(Floor(:Name("Y")/:Name("dimensionY"))));
Summary(
Group(
:Name( "X" ),
:Name( "Y" ),
:Xindex,
:Yindex ),
Std Dev( :Name( "Data1" ) ),
Freq( "None" ),
Weight( "None" )
)
);