2017-09-27 8 views
0

proc reportを使用して、単純なproc printではなくディスプレイを作成したいとします。私のデータはこのように見えます。SAS Procレポート固有の設定

A  B   C  D 
Bill Harry  Bog The 
Bill Harry  Hog Quick 
Bill Harry  Log Brown 
Bill Hermione  Bog Fox 
Bill Hermione  Hog Jumps 
Bill Hermione  Log Over 
Bill Ron   Bog The 
Bill Ron   Hog Lazy 
Bill Ron   Log Dogs 
Ted Harry  Bog Peter 
Ted Harry  Hog Piper 
Ted Harry  Log Picked 
Ted Hermione  Bog A 
Ted Hermione  Hog Powerful 
Ted Hermione  Log Peck 
Ted Ron   Bog Of 
Ted Ron   Hog Picked 
Ted Ron   Log Peppers 

そして、私は最終的な出力は次のようになりたい:

A  B   Bog  Hog  Log 
Bill Harry  The  Quick Brown 
     Hermione Fox  Jumps Over 
     Ron   The  Lazy  Dogs 

Ted Harry  Peter Piper Picked 
     Hermione A  Powerful Peck 
     Ron   Of  Pickled Peppers 

すべての変数が文字です。

どのようにしてprocレポートに設定しますか?私は、グループの様々な組み合わせに近づく、など、私は決してこれを正確に得るように見えることはありません。私はprocレポートの初心者です、どんな助けにも感謝します。

答えて

0

あなたの試したProc REPORTコードを次回投稿すれば、あなたはどのように考えているのかを知ることができます。

カンマ演算子を使用して、列c & dと隠し統計量を積み重ねて、積み重ねを強制します。

proc report data=foo; 
    columns a b c,d n; 
    define a/group; 
    define b/group; 
    define c/across; 
    define d/display; 
    define n/noprint; 
run; 

推奨読書:Sailing Over the ACROSS Hurdle in PROC REPORT. Cynthia L. Zender, SAS Institute Inc., Cary, NC

+0

おかげで、これは働いていました!次回はコードを投稿します。 – doxguy