<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hallo zusammen.
Ich versuche, einen bivariaten Bericht zu schreiben, wobei passende Gruppen in 2er-Reihen angeordnet sind.
Nachfolgend sehen Sie den Bericht nach der manuellen Erstellung anhand der Beispieldaten des Fußballs.

Hier ist das Skript, das Sie erhalten, wenn Sie auf den roten Pfeil einer Passgruppe klicken und "Skript für alle Objekte speichern" auswählen.
New Window( "Football - Bivariate", V List Box( Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "db" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "db" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "db" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "dl" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "dl" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "dl" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "fb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "fb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "fb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "hb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "hb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "hb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ib" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ib" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ib" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ki" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ki" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ki" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ob" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ob" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ob" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ol" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ol" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ol" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "qb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "qb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "qb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "te" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "te" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "te" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "wr" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "wr" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "wr" ) ) ));Und schließlich sieht das Ergebnis so aus:

Ich bin nicht sicher, warum das so ist. Warum ist das gespeicherte Skript nicht genau das, worauf es gespeichert wurde?
Warum erscheint die Gruppierung "Position" außerhalb des Felds "Passgruppe"?
Warum wird die nächste Anpassungsgruppe neben diesem Textfeld platziert, anstatt darunter?
Wie kann man das beheben oder ein aktuelles Skript schreiben, um das erste Bild zu replizieren?
Vielen Dank
Ändern Sie das Skript in:
Neues Fenster ("Fußball - Bivariate",
V-Listenfeld (
Fit Gruppe (
Bivariate (Y (: Höhe), X (: Fett), nach (: Position)),
Bivariate (Y (: Gewicht), X (: Fett), nach (: Position))
<< {In Zeilen anordnen (2)}
)));
Nach 3 Jahren bin ich endlich auf die allgemeine Lösung gestoßen, die ich gesucht habe. Bis zu diesem Zeitpunkt habe ich dynamisch die Liste der Anpassungsgruppen erstellt, die JMP generieren würde, und dann mithilfe von xpath die dummen Textfelder gelöscht und die Titel der Anpassungsgruppe aktualisiert. Trotzdem wäre das Ergebnis nicht vollständig identisch mit dem Ergebnis der JMP-GUI, da beim Erstellen kombinierter Datentabellen keine Spalten für die Kategorien in der "where" -Klausel erstellt würden.
Wenn jemand zuhört, wäre dies viel einfacher gewesen, wenn die Dokumentation besser gewesen wäre. Nichts, was ich irgendwo finden könnte, hätte mich zu der Annahme veranlasst, dass dies der Weg ist, wie es getan werden könnte. Man sollte solche Dinge nicht durch zufälliges Experimentieren lernen müssen.
Siehe unten:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
//the dynamic script to do this analysis
//using the same inputs as the GUI window, with no other knowledge of the DT's contents
//The result is identical to the result generated from the GUI
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
//A lot of this was generated due to preferences I had set.
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 )
),
<<{Arrange in Rows( 2 )},
by(:age)
);
/*
The result JMP returns from "Save Script" > "To Script Window (All Objects)"
Returns a huge mess with fit groups and text boxes containing the "where" clauses
When making a combined data table of any of the resulting tables (such as means/std),
This report will *NOT* create columns with info from the "where" clauses
*/
New Window( "Big Class - Oneway",
V List Box(
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 12 ),
Where( :age == 12 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 13 ),
Where( :age == 13 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 14 ),
Where( :age == 14 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 15 ),
Where( :age == 15 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 16 ),
Where( :age == 16 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 17 ),
Where( :age == 17 )
)
)
);