こんにちは、
そこで、かなり単純なことをしようとしていますが、行の選択で奇妙な動作が発生します。
そこで、混合設計データを含む表を入手しました。 12 の異なる混合成分用に 12 個のカラムがあります。 3 つの列があり、各行に comp A、comp B、comp C という名前のどの 3 つのコンポーネントが存在するかを示します。
実行は、A から K までの文字で名付けられたシリーズに分割されています。 多数の適合モデルを一度に実行するスクリプトを作成したいと考えています。 そのためには、正しい行を含むサブテーブルを作成する必要があります。 基本的には、:Series 列を使用して各シリーズを 1 つずつ選択します。 私の問題は、単一のコンポーネントを含む行も存在することです。 以下のスクリプトを作成しました。
Names Default To Here( 1 );
Delete Symbols();
mytable = Current Data Table();
Serieslist = {} ;
For Each Row(
If(
:Series !="X" & !Contains item (:Series, Serieslist),
Serieslist = Insert (Serieslist, :Series)
);
);
mytable << clear selected row states ();
Letter = Serieslist [1];
mytable << Row Selection( Select where (:Series == Letter) );
S1 = :Comp A[mytable<<GET selected="" rows=""></GET>ここで、正しい行を選択しようとすると、正常に機能しません。 一連の Print() 命令を使用して、値が正しいことを確認しました。
次に、次のコード部分を確認してください。
</CODE></PRE><P> </P><PRE><CODE class=" language-jsl">mytable << Row Selection( Select where (:Ref == complist[1]) );
wait (2);
mytable << Row Selection( Select where (:Ref == complist[2]) );
wait (2);
mytable << Row Selection( Select where (:Ref == complist[3]) );
wait (2);
mytable << Row Selection( Select where (:Ref == complist[1]) );
wait (2);
mytable << Row Selection( Select where (:Ref == complist[2]), current selection ("extend") );
wait (2);
mytable << Row Selection( Select where (:Ref == complist[3]), current selection ("extend") );
mytable << Row Selection( Select where (:Ref == complist[1]) );
wait (2);
mytable << Row Selection( Select where (:Ref == "comp 6"), current selection ("extend") );
wait (2);
mytable << Row Selection( Select where (:Ref == "comp 12"), current selection ("extend") );
最初の 3 つの命令は正しい行を選択します。 しかし、複数の行を選択しようとすると、現在の選択範囲 (「拡張」)議論しても、それは機能しません。 何かが足りないのでしょうか?
最後の行で、select where () 引数に値を手動で書き込むと、機能しますが、コードで '==' を評価する必要がある場合、機能が停止します。 解決策を見つけた人はいますか? これを行うにはもっと良い方法があると確信していますが、それでも、なぜそれが機能しないのかを理解したいと思います。 それはEval Parseに関するものですか?
スクリプトにデータテーブルを添付しました。
行選択では、現在の選択を使用するときに値を評価する必要があるようですEval Insert、Eval Expr、Parse、Substitute を使用して、ある式を別の式に挿入する。 代わりに << Select Where に変更してみることもできます
mytable << Select where(:Ref == complist[1]);
Wait(2);
mytable << Select where(:Ref == "comp 6", current selection("extend"));
Wait(2);
mytable << Select where(:Ref == "comp 12", current selection("extend"));