Verwendet die Standardtabelle `sashelp.class` für statistische Daten und die Tabelle `maps.us` für Kartendaten.
1 Codeblock
INITIALIZATION
Erklärung : Initialisierung globaler Grafikoptionen und Öffnen des ODS HTMLPANEL Ziels zur Erstellung der Datei 'composite.html'.
Kopiert!
%let panelborder=1;
goptions reset=all dev=java;
ods tagsets.htmlpanel path="." (url=none) file="composite.html" style=default;
title1 "This is a graph panel title";
title2 "with a sub-title below it";
footnote1 "This is a panel footnote";
footnote2 "along with a sub-footnote";
Erklärung : Beginn eines Zeilenpanels und einer ersten Spalte. Generierung von zwei Kreisdiagrammen (Alter vs. Größe/Gewicht) vertikal gestapelt in dieser ersten Zelle.
Kopiert!
/* Start a row panel, with a column panel in the first cell */
ods tagsets.htmlpanel event=row_panel(start);
/* Cell 1 */
ods tagsets.htmlpanel event=column_panel(start);
goptions xpixels=240 ypixels=240;
proc gchart data=sashelp.class;
pie age / sumvar=height;
run;
quit;
proc gchart data=sashelp.class;
pie age / sumvar=weight;
run;
quit;
/* Close the column panel */
ods tagsets.htmlpanel event=column_panel(finish);
1
/* Start a row panel, with a column panel in the first cell */
2
ods tagsets.htmlpanel event=row_panel(start);
3
4
/* Cell 1 */
5
ods tagsets.htmlpanel event=column_panel(start);
6
7
goptions xpixels=240 ypixels=240;
8
PROC GCHARTDATA=sashelp.class;
9
pie age / sumvar=height;
10
RUN;
11
QUIT;
12
13
PROC GCHARTDATA=sashelp.class;
14
pie age / sumvar=weight;
15
RUN;
16
QUIT;
17
18
/* Close the column panel */
19
ods tagsets.htmlpanel event=column_panel(finish);
3 Codeblock
PROC GMAP
Erklärung : Erstellung einer Choroplethenkarte der Vereinigten Staaten in der zweiten Zelle (implizite mittlere Spalte oder Fortsetzung des Flusses) mit höherer Auflösung.
Kopiert!
/* Cell 2 */
goptions xpixels=480 ypixels=480;
proc gmap map=maps.us data=maps.us;
id state;
choro state;
run;
quit;
1
/* Cell 2 */
2
goptions xpixels=480 ypixels=480;
3
PROC GMAP map=maps.us DATA=maps.us;
4
id state;
5
choro state;
6
RUN;
7
QUIT;
4 Codeblock
PROC GCHART
Erklärung : Erstellung einer dritten Spalte, die zwei weitere Kreisdiagramme basierend auf dem Durchschnitt (mean) enthält. Schließen der Spalte und der gesamten Zeile.
Kopiert!
/* Cell 3 */
ods tagsets.htmlpanel event=column_panel(start);
goptions xpixels=240 ypixels=240;
proc gchart data=sashelp.class;
pie age / sumvar=height type=mean;
run;
quit;
proc gchart data=sashelp.class;
pie age / sumvar=weight type=mean;
run;
quit;
/* Close the column panel */
ods tagsets.htmlpanel event=column_panel(finish);
/* Close the whole panel */
ods tagsets.htmlpanel event=row_panel(finish);
1
/* Cell 3 */
2
ods tagsets.htmlpanel event=column_panel(start);
3
goptions xpixels=240 ypixels=240;
4
PROC GCHARTDATA=sashelp.class;
5
pie age / sumvar=height type=mean;
6
RUN;
7
QUIT;
8
9
PROC GCHARTDATA=sashelp.class;
10
pie age / sumvar=weight type=mean;
11
RUN;
12
QUIT;
13
14
/* Close the column panel */
15
ods tagsets.htmlpanel event=column_panel(finish);
16
/* Close the whole panel */
17
ods tagsets.htmlpanel event=row_panel(finish);
5 Codeblock
PROC SORT Data
Erklärung : Sortieren der `sashelp.class` Daten nach Geschlecht und Alter, gespeichert in einer temporären Tabelle `temp`.
Kopiert!
title1 "This is a table example";
goptions xpixels=340 ypixels=335;
proc sort data=sashelp.class out=temp;
by sex age;
run;
1
title1 "This is a table example";
2
goptions xpixels=340 ypixels=335;
3
PROC SORTDATA=sashelp.class out=temp;
4
BY sex age;
5
RUN;
6 Codeblock
ODS LAYOUT MIXTE
Erklärung : Erstellung eines zweiten Verbundpanels, das ein horizontales Balkendiagramm (HBAR) in der ersten Spalte und eine Datentabelle (PROC PRINT) in der zweiten Spalte kombiniert. Schließen aller ODS-Ziele.
Kopiert!
/* Start a row panel, with a column panel in the first cell */
ods tagsets.htmlpanel event=row_panel(start);
/* Cell 1 */
ods tagsets.htmlpanel event=column_panel(start);
proc gchart data=temp;
by sex;
hbar age / discrete sumvar=weight type=mean;
run;
quit;
/* Close the column panel */
ods tagsets.htmlpanel event=column_panel(finish);
/* Cell 2 */
proc print data=temp;
run;
quit;
/* Close the whole panel */
ods tagsets.htmlpanel event=row_panel(finish);
ods _all_ close;
1
/* Start a row panel, with a column panel in the first cell */
2
ods tagsets.htmlpanel event=row_panel(start);
3
4
/* Cell 1 */
5
ods tagsets.htmlpanel event=column_panel(start);
6
PROC GCHARTDATA=temp;
7
BY sex;
8
hbar age / discrete sumvar=weight type=mean;
9
RUN;
10
QUIT;
11
12
/* Close the column panel */
13
ods tagsets.htmlpanel event=column_panel(finish);
14
15
/* Cell 2 */
16
PROC PRINTDATA=temp;
17
RUN;
18
QUIT;
19
20
/* Close the whole panel */
21
ods tagsets.htmlpanel event=row_panel(finish);
22
23
ods _all_ close;
Dieses Material wird von We Are Cas "wie besehen" zur Verfügung gestellt. Es gibt keine ausdrücklichen oder stillschweigenden Garantien hinsichtlich der Marktgängigkeit oder Eignung für einen bestimmten Zweck in Bezug auf die hierin enthaltenen Materialien oder Codes. We Are Cas ist nicht verantwortlich für Fehler in diesem Material, wie es jetzt existiert oder existieren wird, noch bietet We Are Cas technischen Support dafür an.
SAS und alle anderen Produkt- oder Dienstleistungsnamen von SAS Institute Inc. sind eingetragene Marken oder Marken von SAS Institute Inc. in den USA und anderen Ländern. ® zeigt die Registrierung in den USA an. WeAreCAS ist eine unabhängige Community-Site und nicht mit SAS Institute Inc. verbunden.
Diese Website verwendet technische und analytische Cookies, um Ihre Erfahrung zu verbessern.
Mehr erfahren.