BookmarkSubscribeRSS Feed
Ronein
Meteorite | Level 14

Hello

I am using proc tabulate procedure with out option to create output data set.

My question is how to control the name of the columns in the output data set.(without using rename statement!!!)

for example:

Instead of names:

MSRP_Mean

MSRP_Max

MSRP_Min 

I want to have name:

x_avg

x_Max

x_Min 

proc tabulate data = sashelp.cars  out=bbb;
class origin;
var msrp;
table origin,
        msrp*mean msrp*max  msrp*min ;
run;

 

 

 

1 REPLY 1
SASKiwi
PROC Star

I don't see any other way of doing this inside TABULATE except using RENAME = like so:

out = bbb (rename = (CurrentName = NewName))

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 390 views
  • 0 likes
  • 2 in conversation