Help using Base SAS procedures

PROC TABULATE

Reply
Contributor
Posts: 35

PROC TABULATE

Hi ALL

Could some one explain what does "table" keyword do in "PROC TABULATE".

Respected Advisor
Posts: 3,777

Re: PROC TABULATE

From the online doc. "Describes a table to be printed.".

Contributor
Posts: 35

Re: PROC TABULATE

Hi

Thanks for the information....

SAS Employee
Posts: 224

Re: PROC TABULATE

Here's a link to the Base SAS(R) 9.4 Procedures Guide of the Language and Reference Guide.  You might also find the Syntax Index a useful tool.  To use the Syntax Index, just start typing in the language element for which you want more information.

Good luck!

Contributor
Posts: 35

Re: PROC TABULATE

Hi

Thanks for exhaustive information .

Could you u help me on understanding "classdata" option in proc tabulate , preferably with an executed example.

Thanks for help.

SAS Super FREQ
Posts: 8,740

Re: PROC TABULATE


Hi,

  I would suggest that you look at the PROC TABULATE documentation or for user group papers like this one: http://www.lexjansen.com/pharmasug/2010/hw/hw03.pdf . Using the CLASSDATA option is one way to limit or filter the number of rows that get passed to PROC TABULATE for building a report table.

cynthia

  

ods listing close;

** these are the ONLY product/year rows we want in the TABULATE;

data wantdata;

  length PRODUCT $10 year 8;

  infile datalines;

  input PRODUCT $ YEAR;

  format product $char10. year 4.;

return;

datalines;

SOFA 1993

SOFA 1994

TABLE 1994

CHAIR 1993

BED 1993

DESK 1994

;

run;

    

options missing=0;

ods html file='c:\temp\example_ClassData.html' style=sasweb;

    

** See all years, all products in sashelp.prdsale;

proc freq data=sashelp.prdsale;

  title 'Values in SASHELP.PRDSALE';

  tables Product Year;

run;

    

** what is in wantdata?;

proc print data=work.wantdata;

  title 'Values in Work.wantdata';

run;

    

** Use WANTDATA dataset with SASHELP.PRDSALE to limit analysis to ONLY;

** the rows in the WANTDATA dataset. Note that the variables must have the SAME;

** type and format in the WANTDATA dataset as in the SASHELP.PRDSALE dataset.;

proc tabulate data=sashelp.prdsale f=comma8.

     classdata=work.wantdata exclusive;

  title 'ClassData and Exclusive for Data Subset';

  class  product year;

  var actual;

      

  table product,

        (year)*actual*(n sum mean)

     /box="ClassData and Exclusive";

      

  label Year = 'Year'

        Product = 'Product';

run;

     

ods html close;

ods listing;

Contributor
Posts: 35

Re: PROC TABULATE

Hi Cynthia,

This is great and helpful.

Ask a Question
Discussion stats
  • 6 replies
  • 313 views
  • 0 likes
  • 4 in conversation