Help using Base SAS procedures

PROC MEANS output

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

PROC MEANS output

Hi everyone,

this is a beginner's question, but I can't find anything similiar in the forum.

I use proc MEANS to determine min and max values:

PROC MEANS DATA=WORK.PARCELDT MIN MAX;  

VAR WEIGHT;                             

CLASS WEEKNUM CARTON LENGHT WIDTH THICK;

The output is:

WEEKNUM     CARTON     LENGHT     WIDTH     THICK     N Obs     Minimum     Maximum

    1                       0     800     650     300     1     167000     167000

                                  1200     800     1200     1     59000     59000

                                1700     1300     960     1     675000     675000

                           17     750     750     480     102     23000     716000

But it shoud be as following:

WEEKNUM     CARTON     LENGHT     WIDTH     THICK     N Obs     Minimum     Maximum

    1                       0     800     650     300     1     167000     167000

    1                       0     1200     800     1200     1     59000     59000

    1                       0     1700     1300     960     1     675000     675000

    1                       17     750     750     480     102     23000     716000

Are there an output options for this?

Thanks!

Kathy


Accepted Solutions
Solution
‎03-10-2014 10:17 AM
Super User
Super User
Posts: 6,500

Re: PROC MEANS output

Are you talking about the appearance of the report that PROC MEANS produces?  If you ask it to create a dataset the values are there, it is just that the report does not replicate the common values so that it is easier to read.

proc means data=work.parceldt nway noprint ;

  class weeknum carton lenght width thick;

  var weight;

  output out=want min= max= /autoname ;

run;

proc print data=want;

run;

View solution in original post


All Replies
Solution
‎03-10-2014 10:17 AM
Super User
Super User
Posts: 6,500

Re: PROC MEANS output

Are you talking about the appearance of the report that PROC MEANS produces?  If you ask it to create a dataset the values are there, it is just that the report does not replicate the common values so that it is easier to read.

proc means data=work.parceldt nway noprint ;

  class weeknum carton lenght width thick;

  var weight;

  output out=want min= max= /autoname ;

run;

proc print data=want;

run;

New Contributor
Posts: 4

Re: PROC MEANS output

easy Smiley Happy

I tried proc print as well, but I missed the NWAY option :smileyblush:

Thank you!

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 161 views
  • 0 likes
  • 2 in conversation