2017-09-27 7 views
0

간단한 proc 인쇄 대신에 proc 보고서를 사용하여 디스플레이를 만들고 싶습니다. 내 데이터는 이렇게 보입니다.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