JSL_open と for ループ内のリストからのデータ テーブルの結合こんにちは。JSL でテーブルを結合するスクリプトを作成しようとしています。結合するテーブルの数を入力できます。このために、HTML テーブルの場所、テーブル名、結合列を入力するリストを作成しました。
結合の前に、まずテーブルを開いて、for ループ内のリストから要素を取得します。
「"tables_list[i]"、tables_list[/*###*/] のアクセスまたは評価における添え字の問題」というエラー メッセージが表示されます。
私が何を間違えたのか分かりますか?よろしくお願いいたします
// Indicate how many input data tables you have (default = 1)
nb_join_tables = 2;
// Indicate here the link to the first input HTML table
input_table_01 = "http://xxxx.html";
// Indicate here the names you want for your first JMP data tables
JMP_table_01_name = "xxx -01";
// Indicate here the link to the input HTML table to join
input_table_02 = "http://xxxx.html";
input_table_03 = "http://xxxx.html";
// Indicate here the names you want for the data tables to join
JMP_table_02_name = "xxx -02";
JMP_table_03_name = "xxx -03";<BR /><BR />// indicate here the column you want JMP to use as joiner for the tables merge (default:Parameter Set Name)<BR />joiner_table_01 = "Parameter Set Name";<BR />joiner_table_02 = "Parameter Set Name";<BR />joiner_table_03 = "Parameter Set Name";
// Create lists according to the number of tables to merge
tables_list = {input_table_01,input_table_02,input_table_03};
names_list= {JMP_table_01_name,JMP_table_02_name,JMP_table_03_name};
joiners_list = {joiner_table_01,joiner_table_02,joiner_table_03};
For( i = 0, i <= nb_join_tables, i++,
//Open html data table from specific location
dt=Open(
tables_list[i],
HTML Table( 4, Column Names( 0 ), Data Starts( 1 ) )
);
// Set JMP data table name to the desired one
dt << Set Name( names_list[i] );
);自動化とスクリプト作成データアクセス品質およびプロセスエンジニアリングRe: JSL_open と for ループ内のリストからのデータ テーブルの結合素晴らしい、ありがとう、うまくいきました!!
Re: JSL_open と for ループ内のリストからのデータ テーブルの結合このコード
tables_list = {input_table_01,input_table_02,input_table_03};変数の内容のリストではなく、変数名のリストを作成します。 Open は、内容が期待される変数の名前を参照します。これを使用して、名前をその内容に合わせて評価できます。
tables_list = Eval List( {input_table_01,input_table_02,input_table_03} );または、次のようにリストを作成することもできます。
tables_list = {};
tables_list[1] = input_table_01;
tables_list[2] = input_table_02;
tables_list[3] = input_table_03;Re: JSL_open と for ループ内のリストからのデータ テーブルの結合ログは次のとおりです。
i = 1;
tables_list = {input_table_01、input_table_02、input_table_03、input_table_04、input_table_05、input_table_06};
入力テーブル_01
Open 引数は、 'Open' のアクセスまたは評価における文字列である必要があります、 Open/*###*/(tables_list[i], HTML Table( 4, Column Names( 0 ), Data Starts( 1 ) ))
Re: JSL_open と for ループ内のリストからのデータ テーブルの結合失敗する場所の直前にデバッグ ステートメントを追加します。
For( i = 0, i <= nb_join_tables, i++,
show(i, tables_list); // check the log window for the output
//Open html data table from specific location
dt=Open(
tables_list[i],
HTML Table( 4, Column Names( 0 ), Data Starts( 1 ) )
);
// Set JMP data table name to the desired one
dt << Set Name( names_list[i] );
);
Re: JSL_open と for ループ内のリストからのデータ テーブルの結合こんにちは、クレイグ、
n= 1でも試しましたが、どちらも機能しません。実際には、最初に i=1 を設定し、念のため i=0 をテストしましたが、投稿する前に再度 i=1 を設定するのを忘れていました。
ただし、問題はないようです。
他に何かアイデアはありますか?
Re: JSL_open と for ループ内のリストからのデータ テーブルの結合JSL のリストと行列は 1 から始まります。JMP では、for( i = 0, i < n, i++, ... ではなく for( i = 1, i <= n, i++, ... を使用します。