Re: 階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?アウトライン ボックスの正確な順序がわかっている場合は、次を使用できます。
prf = Current Report()["Fit Group",OutlineBox(3)]<<SET title=""></SET>
また
prf = Current Report()["Fit Group","Response A","Prediction Profiler"]<<SET title=""></SET>
Re: 階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?各回答アウトライン ボックスの下に 1 つしかないことがわかっているので、個々の回答プロファイラーにドリルダウンしたい場合は、あなたの提案が機能します。 次に、対象のアウトライン ボックスまでの正確なパスを参照に含めることができます。
ただし、私は特に「グループ」プロファイラーにアクセスしたいと考えています。これは、たまたま階層的に最も高いものです。つまり、個々の回答のアウトラインボックスの下のレベルではなく、「グループに合わせる」アウトラインボックスのすぐ下にあります。
問題は、正確な順序がわからないことです。常に異なります。回答アウトライン ボックスの数だけでなく、個々の回答プロファイラーやその中の他のアウトライン ボックスの存在も異なる場合があるため、番号で参照することはできません。 残念ながら、参照構文は階層を考慮しておらず、全体的な出現順序のみを考慮しているようです。
また、関心のあるプロファイラーもたまたま出現順で最後のものですが、これもあまり役に立ちません。なぜなら、それらをループせずにそれらの番号がわからないためです。これはすでに行っています。
Re: 階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?Xpathまたはインデックス作成が機能するはずです
Names Default To Here(1);
nw = New Window("Report",
Outline Box("Fit Group",
Outline Box( "Response A",
Outline Box("Prediction Profiler")
),
Outline Box( "Response B",
Outline Box("Prediction Profiler")
),
Outline Box( "Response C",
Outline Box("Prediction Profiler")
),
Outline Box( "Prediction Profiler" )
)
);
wait(1);
obs = nw[OutlineBox("Fit Group")] << XPath("//OutlineBox");
Right(obs, 1) << Set Title("This");
wait(1);
nw = New Window("Report",
Outline Box("Fit Group",
Outline Box( "Response A",
Outline Box("Prediction Profiler")
),
Outline Box( "Response B",
Outline Box("Prediction Profiler")
),
Outline Box( "Response C",
Outline Box("Prediction Profiler")
),
Outline Box( "Prediction Profiler" )
)
);
wait(1);
nw["Fit Group",OutlineBox(8)] << Set Title("That");Re: 階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?使用できますXPath()すべてを手に入れるアウトラインボックス-- 次に、それをフィルタリングして、タイトルを持つボックスの輪郭を描くことができます「予測プロファイラー」お望みならば。それからあなたはそれぞれに尋ねることができますアウトラインボックスその親が何であるか、それをトップレベルに一致させますアウトラインボックス「フィットグループ」 .これは最初に引っ張りますアウトラインボックスタイトル付き「予測プロファイラー」の直接の子です。 OutlineBox( "グループに合わせる" ) .
win = New Window("Report",
Outline Box("Fit Group",
Outline Box( "Response A",
Outline Box("Prediction Profiler")
),
Outline Box( "Response B",
Outline Box("Prediction Profiler")
),
Outline Box( "Response C",
Outline Box("Prediction Profiler")
),
Outline Box( "Prediction Profiler" )
)
);
olb = win[Outline Box( "Fit Group" )]; // top-level OLB of interest
olbs = olb << XPath( "//OutlineBox" ); // ALL child OLBs, regardless of hierarchy
titles = olbs << Get Title; // Get the titles of each OLB
profilers = Loc( titles, "Prediction Profiler" ); // Find the OLB locations in the list with title "Prediction Profiler"
profiler olbs = olbs[profilers]; // Get the list of OLBs with title "Prediction Profiler"
direct child profiler loc = Contains( profiler olbs << Parent, olb ); // Location of OLBs that have the "Fit Group" OLB as the direct parent
profiler = profiler olbs[direct child profiler loc]; // First of the above list
Wait( 2 );
profiler << Set Title( "Gotcha!!" ) // change name to show that the correct OLB is referenced
Re: 階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?XPath 言語を使用して、XML ツリー内の特定のオブジェクトを取得できます。
Names Default to Here( 1 );
// set up example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Fit Group(
Fit Model(
Y( :height ),
Effects( :age, :sex ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
age( 12, Lock( 0 ), Show( 1 ) ),
sex( "F", Lock( 0 ), Show( 1 ) )
)
),
:height << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )}
)
),
Fit Model(
Y( :weight ),
Effects( :age, :sex ),
Personality( "Standard Least Squares" ),
Emphasis( "Minimal Report" ),
Run(
Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
age( 12, Lock( 0 ), Show( 1 ) ),
sex( "F", Lock( 0 ), Show( 1 ) )
)
),
:weight << {Summary of Fit( 1 ), Analysis of Variance( 1 ),
Parameter Estimates( 1 ), Scaled Estimates( 0 ),
Plot Actual by Predicted( 0 ), Plot Regression( 0 ),
Plot Residual by Predicted( 0 ), Plot Studentized Residuals( 0 ),
Plot Effect Leverage( 0 ), Plot Residual by Normal Quantiles( 0 ),
Box Cox Y Transformation( 0 )}
)
),
<<{Profiler(
1,
Confidence Intervals( 1 ),
Term Value(
age( 12, Lock( 0 ), Show( 1 ) ),
sex( "F", Lock( 0 ), Show( 1 ) )
)
)}
);
// start to change title
rpt = obj << Report;
profiler = rpt << XPath( "//OutlineBox[text()='Prediction Profiler']" );
last = N Items( profiler );
profiler[last] << Set Title( "I'm here!" );Re: 階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?皆さん、ありがとうございました!
ループするより断然いいです。
Re: 階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?皆さん、ありがとうございました!
ループするより断然いいです。
Re: 階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?これは、マークの例で機能する元の検索アルゴリズムのxpathへのかなり文字通りの翻訳です
pp =(rpt << xpath("//OutlineBox[text()='Prediction Profiler'][count(./ancestor::OutlineBox[contains(text(),'Response')])=0]"));
pp << Set Title("I'm here");
表示ツリーの上部から、タイトルが「Predicted Profiler」で、その上に「Response」という単語を含むタイトルの OutlineBoxes が 0 個ある OutlineBox を検索します。また、Jmp 17 では、プロパティ パネルに新しいコントロールがあり、任意の表示ボックスにウィンドウの添え字または xpath スニペットを提供することも指摘する価値があります。それが提供するスニペットは、ここに投稿されたソリューションのいくつかほど柔軟ではありませんが、良い出発点になるでしょう

階層を考慮して、同じ名前のアウトライン ボックスを参照するにはどうすればよいですか?やあ、
ドキュメントを読んでRTFF編集しましたが、かなり些細な問題だと思われる解決策が見つかりませんでした。 あるいは、私はそれを完全に見逃していて、それは完全に明白なことかもしれません。
次のようなアウトライン ボックスのツリー構造のレポートがあるとします (実際には、たとえば、追加のレイヤーを備えたより複雑な構造を持つ複数の回答を含む最小二乗法フィット レポートですが、この手動で作成された例は、まったく同じ問題を示しています)。
New Window("Report",
Outline Box("Fit Group",
Outline Box( "Response A",
Outline Box("Prediction Profiler")
),
Outline Box( "Response B",
Outline Box("Prediction Profiler")
),
Outline Box( "Response C",
Outline Box("Prediction Profiler")
),
Outline Box( "Prediction Profiler" )
)
);「グループ」「予測プロファイラー」(最後のもの)にアクセスしたいと考えています。
ただし、以下の参照は最初のもの (応答 A の予測プロファイラー) を返します。これは、階層レベルを考慮せずに出現順に番号が付けられているため、これが最初のものであるためだと思います。
prf = Current Report()[Outline Box("Fit Group")][Outline Box("Prediction Profiler")];
Show( (prf << parent) << get title ) // check the parent - confirmation that it returns the "Response A" profiler 私の現在の解決策は、それらすべてをループして親名を確認することです。 親名が「Response」で始まらないものが正しいものです。 非常に単純な作業の割に、これだけ大騒ぎになっているような気がします。
もっとエレガントで直接的な参照方法はあるでしょうか?
ありがとう
データの探索と視覚化ウィンドウズ