我有一個腳本,在 JMP 中開啟一個 txt 檔案作為資料表,然後將第 7 行中列出的列名稱移至列標題。 如何將其應用於多個數據表? 我當前的腳本不起作用。 我有JMP16。 謝謝。
dt_list = Multiple File Import(); //additional known text here to open files
table_script = expr(
//Move the column names listed in row 7 to the column headers
dt = Current Data Table();
dt << clear select;
dt << Clear Column Selection();
lastcol = N Col( dt );
header = 7;
For( i = 1, i <= lastcol, i++,
Column( i ) << set Name( Column(i)[header] )
);
);
Eval(
Eval Expr(
For Each( {value, index},
Expr( dt_list[index] << table_script )
)
)
);