How to export rows/columns from different files to the same output table<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />[Exporting rows/columns from different files]
Hello, All.
I am exporting columns that meet certain criteria [which I select using "select where"].
How do I export from different files at once to the same "output table"?
How do I delete columns from the original files?
[File size increases significantly if I save the database with calculations]
This is the script I use to export from one file at the time.
Thank you!
dt =Current Data Table();dt << select where( :Condition == 1 );Data Table( "DataSet1.jmp" ) <<Subset( Output Table( "Subset1" ), Selected Rows( 1 ), columns( :TIMESTAMP, :Measurement_series_ID, :Name( "Var1" ), :Name( "Var2" ), :Name( "Var3" ), :Name( "Var4" ), :Name( "Var5" ), :Name( "Var6" ) ));
Re: How to export rows/columns from different files to the same output tableThe typical flow of a script that creates a single output table from multiple input tables would be to:
1. Subset required data from table 1.
2 Subset required data from table 2.
3. Join or concatenate the data together.
4. Subset the required data from table 3
5. Join or concatenate the data from the first joined/concatenated table with table 3.
The following is a simplified script that illustrates one way of handling the issue where data tables are cumbersom because of their size.
Names Default to Here(1);
dt1=Open();
dt1<
Mvar1=dt1:var1[dt1<
close(dt1,nosave);
nt=new table("output table");
nt<
dt2=Open();
dt2<< select where(:condition==2);
Mvar2=dt2:varX[dt2<
close(dt2,nosave);
nt<
......
To answer your question about how to delete columns in a data table, a simple delete columns message is passed to the data table you want to delete the columns from:
dt<
All of these items are covered in the Scripting Guide available from the pull down menus in JMP.
Help==>Books==>Scripting Guide