列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?やあ、
新しい挑戦:
Columnプロパティを作成しました:テスト番号1st_fileにあります。 各テストには一意のテスト番号があります。これは、下の強調表示された赤い円で示されているように、列のプロパティにあります。

1つの列(テスト)を持つ2番目のJMPファイルがあります:

1番目のファイルからテスト番号をコピーし、2番目のファイルのテストの中で最も低い値を割り当てることができるスクリプトを作成しようとしているので、出力は比較的次のようになります。
テスト番号は、1番目のファイルのColumnプロパティで定義されます
例えば燃焼、冷却、 ESD =最小[テスト番号]=21
出力:

助言がありますか?
ありがとう
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?If .....を試してみてください。ただし、分岐の範囲を大きくする必要があります。下記参照......
Names Default To Here( 1 );
dt1 = Data Table( "1st_file" );
dt2 = Data Table( "2nd file" );
dt2 << New Column( "Test Number" );
For( i = 1, i <= N Rows( dt2 ), i++,
k = 1;
While( Word( k, dt2:test[i], "," ) != "",
theWord = Word( k, dt2:test[i], "," );
If( theWord != "N/A",
If( k == 1,
theTest = Column( dt1, theWord ) << get property( "Test Number" ),
theCompare = Column( dt1, theWord ) << get property( "Test Number" );
If( theCompare < theTest,
theTest = theCompare
);
)
,
theTest = 0
);
k++;
);
dt2:test number[i] = theTest;
);Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?やあ@txnelson 、
最後の質問
私はいくつか持っています該当なしこのような行でテストします。 割り当てたかったテスト番号なので0に該当なし行

追加しましたもしも()ステートメントですが、ステートメントを正しく入力したかどうかはわかりません。 見ていただけませんか?
Names Default To Here( 1 );
dt1 = Data Table( "1st_file" );
dt2 = Data Table( "2nd file" );
dt2 << New Column("Test Number");
For( i = 1, i <= N Rows( dt2 ), i++,
k = 1;
While( Word( k, dt2:test[i], "," ) != "",
theWord = Word( k, dt2:test[i], "," );
If( k == 1,
theTest = Column( dt1, theWord ) << get property( "Test Number" ),
theCompare = Column( dt1, theWord ) << get property( "Test Number" );
If( theCompare < theTest,
theTest = theCompare
);
);
k++;
<STRONG>If( Word( 1, dt2:test[i], "," ) == N/A,
dt2:test number[i] = 0;
);</STRONG><BR /> );
dt2:test number[i] = theTest;
);
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?Names Default To Here( 1 );
dt1 = Data Table( "1st_file" );
dt2 = Data Table( "2nd file" );
For( i = 1, i <= N Rows( dt2 ), i++,
k = 1;
While( Word( k, dt2:test[i], "," ) != "",
theWord = Word( k, dt2:test[i], "," );
If( k == 1,
theTest = Column( dt1, theWord ) << get property( "Test Number" ),
theCompare = Column( dt1, theWord ) << get property( "Test Number" );
If( theCompare < theTest,
theTest = theCompare
);
);
k++;
);
dt2:test number[i] = theTest;
);Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?やあ@txnelson 、
可能であればコードを投稿していただけますか? このタスクを完了する期限があります。 テストが3つ未満の行にwhile()関数を使用してみましたが、実行されていません。 議論は長くなり、混乱を招きます。
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?やあ@txnelson 、
提案があります。 リストを作成してテスト番号をリストに保存し、構文を使用できますか? Min()最小の番号を割り当てるには?
For (i=1, i<=2, i++,
theWord = word(i,dt2:test[1],",");
theTest() = column( dt1, theWord ) << get property("Test Number");
dt2:test number[1] = Min(theTest);
);
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?これは私にあります.....私は間違った変数でテストを行っていました。比較を行うステートメントは次のようになります。
If( theCompare < theTest,
theTest = theCompare
);
しかし、別の問題があります......スクリプトは、列Testの各行に常に3つの値があることを前提としています。3未満の場合、スクリプトは失敗します。3を超える場合、スクリプトは4,5などのアイテムと比較されません。
この問題を解決する方法については、While()関数をご覧ください。
以下は、compareステートメント用に修正されたコードです。
Names Default To Here( 1 );
dt1 = Data Table( "1st_file" );
dt2 = Data Table( "2nd file" );
For( i = 1, i <= N Rows( dt2 ), i++,
theWord = Word( 1, dt2:test[i], "," );
theTest = Column( dt1, theWord ) << get property( "Test Number" );
theWord = Word( 2, dt2:test[i], "," );
theCompare = Column( dt1, theWord ) << get property( "Test Number" );
If( theCompare < theTest,
theTest = theCompare
);
theWord = Word( 3, dt2:test[i], "," );
theCompare = Column( dt1, theWord ) << get property( "Test Number" );
If( theCompare < theTest,
theTest = theCompare
);
dt2:test number[i] = theTest;
);
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?やあ@txnelson 、
あなたが提案したロジックは、いくつかの条件では機能しません。 テストの順序を変更すると、スクリプトが誤った値を生成し、行4、5、6のテスト番号が空白になります
テスト=冷却、ESD、電流
テスト番号=テスト番号の最小値[32、87、23] = 23
テスト番号は2列目で23でなければなりません。

私はあなたが提案した声明を訂正しました:
For (i=1, i<=nrows(dt2), i++,
theWord = word(1,dt2:test[i],",");
theTest = column( dt1, theWord ) << get property("Test Number");
theWord = word(2,dt2:test[i],",");
theCompare = column( dt1, theWord ) << get property("Test Number");
If( theCompare < theWord, theTest = theCompare );
theWord = word(3,dt2:test[i],",");
theCompare = column( dt1, theWord ) << get property("Test Number");
If( theCompare < theWord, theTest = theCompare );
dt2:test number[i] = theTest;
);
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?問題はこの声明にあります
theWord = word(i,dt2:test[i],",");
For()ループはインデックスとして「i」を使用しており、1からN Rows(dt2)まで変化します。したがって、1から5まで変化します。Word()関数内の2つの異なる場所で「i」インデックスを使用しています。dt2:Test [i]は、1行目から5行目を読み取ります。ただし、JSL構文リファレンスを見るとWord()関数の場合
Word(n|[first last], string, <delimiter>, <Unmatched(result string)>)
Description
Returns the nth item of the string, where words are sub-strings separated by any number of
any characters in the delimiter argument.
Arguments
n The position of the word being extracted.
[first last] A matrix that defines the beginning and end word range to return.
string The string that is evaluated.
delimiter (Optional) The character used as a boundary. If delimiter is absent, an ASCII
space is used. If delimiter is the empty string, each character is treated as a separate
word. If delimiter is an empty string, each character is treated as a spate word.
Unmatched(result string) The string to print if no match is found.
Examples
This example returns the last name:
Word( 2, "Katie Layman" );
Note
See “Item(n|[first last], string, <delimiter>, <Unmatched(result string)>, <Include
Boundary Delimiters(Boolean)>)” on page 35 for examples of how Word() differs from
Item().
削除するWordに何を指定するかは、「i」の値によって異なります。それはあなたが望むものではありません。私が提供したコードでは、あなたが見ると、それは1、2、または3のいずれかでした
だからあなたはそれを調整する必要があります
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?やあ@txnelson 、
投稿したスクリプトでForループを使用しました。
names default to here(1);
dt1 = data table("1st_file");
dt2 = data table("2nd file");
dt2 << New Column("Test Number");
For(i=1, i<=nrows(dt2),i++,
theWord = word(i,dt2:test[i],",");
theTest = column( dt1, theWord ) << get property("Test Number");
theWord = word(i,dt2:test[i],",");
theCompare = column( dt1, theWord ) << get property("Test Number");
If( theCompare < theWord, theTest = theCompare );
theWord = word(i,dt2:test[i],",");
theCompare = column( dt1, theWord ) << get property("Test Number");
If( theCompare < theWord, theTest = theCompare );
dt2:test number[i] = theTest;
);
<BR />2番目のファイルの4行目と5行目に値を割り当てていません

Forループで間違いを犯したと確信しています。 ガイダンスをお願いします。
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?@txnelsonあなたは天才です。 はい、あなたは正しいです。私は学び始めます。 どうもありがとうRe:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?@ Jacksmith12前の例では、これらすべてのステートメントと関数を示しました。あなたはそれらを自分でまとめようとすることができるようになる必要があります。コンピューティングにおいて、あなたが学ぶ唯一の方法は、間違いを犯し、問題が何であるかを理解することです。したがって、以下は2nd_fileからの単一エントリのフローであり、最小テスト番号を返します。コードの残りの部分をまとめることができるはずです。
names default to here(1);
dt1 = data table("1st_file ");
dt2 = data table("2nd file ");
dt2 << New Column("Test Number");
theWord = word(1,dt2:test[1],",");
theTest = column( dt1, theWord ) << get property("Test Number");
theWord = word(2,dt2:test[1],",");
theCompare = column( dt1, theWord ) << get property("Test Number");
If( theCompare < theWord, theTest = theCompare );
theWord = word(3,dt2:test[1],",");
theCompare = column( dt1, theWord ) << get property("Test Number");
If( theCompare < theWord, theTest = theCompare );
dt2:test number[1] = theTest;
コードの各行を理解していることを確認してください。理解していない場合は、理解していないことについて具体的に質問してください。
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?クイックスタートの例を挙げていただけますか?Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?1st_fileでは、列にはそれぞれ1つの列プロパティのみがあります。テスト番号.....テスト名はありません。
テスト名の各列の2番目の列プロパティが1st_Fileデータテーブルにあるはずだとすると、それらにアクセスする最良の方法は連想配列を作成することだと思います。 次に、各列をループして2つの列プロパティを抽出し、それらを連想配列に配置します。 最後に、2nd_fileを行ごとにループし、列Testの値を取得すると、必要なテスト番号を取得するために、連想配列に対する単純なルックアップになります。Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?やあ@txnelson 、
列のプロパティを右クリックすると、テスト番号とテスト名が表示されます。
Re:列のプロパティをJMPデータファイルにインポートするにはどうすればよいですか?2nd_fileの特定の行の値の計算で、1st_fileのどの列が評価されているかをどのように知ることができますか?