1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

SASテクニック sgplotプロシジャをtemplate化

Last updated at Posted at 2020-06-16

sgplotプロシジャのコードをtemplate(GTL)のコードに変換するテクニック

sgplotの方が個人的には書きやすいが、細かいオプション等はtemplateの方が優れているイメージのため、一度sgplotで作ってtemplateに変換したこともある
まぁあんま使わないけど...

準備

%* templateのコードをテキストファイルにはきだすので、パスとファイル名をマクロ変数に格納 *;
%let Pass = パス;
%let File = template_code.txt;

sgplotプロシジャからtemplateプロシジャのコードを作成

ods select none;
proc Sgplot data = sashelp.CLASS tmplout = "&Pass.&File.";
  scatter x = NAME y = HEIGHT / group = AGE;
run;
ods select all;

tmploutオプションをつけることで、templateコードを作成
sgplotの結果いらないなら、上のようにods select none;で出力させないようにする

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?