3175_de-DE
Spalte als Variable übergeben, um in der Verteilung verwendet zu werdenHallo,
Ich versuche, den Spaltennamen an eine Funktion zu übergeben und dann in der Distribution zu verwenden, aber es kommt zurück mit:
Ein Befehl im Verteilungsskript wurde nicht erkannt.
Keine zu analysierenden Daten
Es ist die Spalte (varB) in der Distribution.
Vielen Dank,
Alex (auf Jmp 8)
RuntheGraphs = Funktion ({varB},
show (varB);
Verteilung(
Einheitliche Skalierung (0),
Kontinuierliche Verteilung (
Spalte (varB),
Horizontales Layout (1),
Vertikal (0),
Zählachse (1),
Zählungen anzeigen (1),
Outlier Box Plot (0)
)
Wo (: IPRO_TPT_Completed == 1)
)/*Verteilung*/
);
c = "Einzelblatt";
RuntheGraphs (Eval (c));
Nachricht wurde bearbeitet von: alexRe: übergeben Sie die Spalte als Variable, um in der Verteilung verwendet zu werdenDanke euch beiden. Das ist großartig (wenn auch nicht ein bisschen hack-ish.)Re: übergeben Sie die Spalte als Variable, um in der Verteilung verwendet zu werdenZweiter Versuch:
Re: übergeben Sie die Spalte als Variable, um in der Verteilung verwendet zu werdenDies ist ein häufiges Problem, das bei JSL auftritt. Wenn alles andere fehlschlägt, erstelle ich einen Ausdruck und verwende dann eval (parse ()). Hier ist ein funktionierender Code:
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> RuntheGraphs
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;"> =
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; color: rgb (0, 0, 221);"> Funktion
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> (
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
{ varB }
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;">,
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "">
style = "font-size: 10pt; font-family:" Courier New "; color: rgb (0, 0, 221);"> Anzeigen
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> (
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
varB )
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;">;
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "">
dist_expr
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;"> =
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;"> "
style = ""> Verteilung(
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Uniform
Skalierung (0),
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Kontinuierlich
Verteilung(
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Säule("
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;"> ||
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = ""> varB
style = "">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;"> ||
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;"> "),
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Horizontal
Layout (1),
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Vertikale(
0),
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Anzahl
Achse (1),
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Show
Zählungen (1),
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Ausreißer
Box Plot (0)
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
)
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
Woher(
: sex == \! "F \!" )
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;">
style = "">
) "
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;">;
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "">
style = "font-size: 10pt; font-family:" Courier New "; color: rgb (0, 0, 221);"> eval
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> (
style = "font-size: 10pt; font-family:" Courier New "; color: rgb (0, 0, 221);"> parse
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> (
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> dist_expr ))
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;">;
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">)
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;">;
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> dt
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;"> =
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; color: rgb (0, 0, 221);"> öffnen
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> (
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;"> "$ sample_data \ big
class.jmp "
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">)
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;">;
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> c
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;"> =
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: lila;"> "height"
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;">;
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;"> RuntheGraphs (
c )
style = "font-size: 10pt; font-family:" Courier New "; Farbe: navy;">;
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
style = "font-size: 10pt; font-family:" Courier New "; Farbe: schwarz;">
Re: übergeben Sie die Spalte als Variable, um in der Verteilung verwendet zu werdenIch habe das Buch gerade geöffnet!
Kannst du mir die Seite geben?
(Es sieht so aus, als hätten Sie ein Put und eine Vergangenheit gemacht, aber es ist in der HTML verloren gegangen.)Re: übergeben Sie die Spalte als Variable, um in der Verteilung verwendet zu werdenHallo Alex:
Springen Sie in JMP Scripting
Von: Wendy Murphrey und Rosemary Lucas
https://support.sas.com/pubscat/bookdetails.jsp?catid=1&pc=61733
Geben Sie ein Beispiel an:
<-
/ * Lösung 9.2 * /
/ * Öffnen Sie die Fitness-Beispieldatentabelle tableNi. * /
dt = Open ("$ SAMPLE_DATA / Fitness.jmp");
/ * Weisen Sie die Kriterien einer globalen Variablen zu. * /
selVar = "M";
yvar = "MaxPulse";
xvar = "RstPulse";
/ * Erstellen Sie den Hauptausdruck. * /
bivExpr = Ausdruck (
Bivariate (
Y (: Ausdruck (yvar)),
X (: Ausdruck (xvar)),
/ * Identifizieren Sie die globale Variable, indem Sie sie mit der Funktion Expr umschließen. * /
Wo (: sex == Ausdruck (selVar))
)
);
/ * Zuerst den globalen Variablenausdruck auflösen. Dann lösen Sie den Hauptausdruck auf. * /
Eval (Eval Expr (bivExpr));
Anpassung an Ihr spezielles Beispiel:
dt = Open ("$ sample_data / Big Class.jmp");
/ * Weisen Sie die Kriterien einer globalen Variablen zu. * /
c = "Höhe";
/ * Erstellen Sie den Hauptausdruck. * /
dist = Ausdruck (Verteilung (
Kontinuierliche Verteilung (
/ * Identifizieren Sie die globale Variable, indem Sie sie mit der Funktion Expr umschließen. * /
Spalte (: Ausdruck (c)),
Horizontales Layout (1),
Vertikal (0),
Fitverteilung (Normal)
)
)
);
/ * Zuerst den globalen Variablenausdruck auflösen. Dann lösen Sie den Hauptausdruck auf. * /
Eval (Eval Expr (dist));
->
Freundliche Grüße,
-Matt
Comments
There are no comments yet