BookmarkSubscribeRSS Feed
chinaski
Obsidian | Level 7

Hi,

I want my proc univariate report headings to be seen properly, just like we do in proc print with split="_" option. What is the solution for that. Thanks to anybody that helps.

 

ValueNAME_SURNAMEFIRM_NAMEPRODUCT_NAME

 

i want this to be like this in proc univariate report

 

ValueNAME
SURNAME
FIRM
NAME
PRODUCT
NAME

 

3 REPLIES 3
Astounding
PROC Star

This may be possible, but you will have to play with it to find out.

 

Assign labels to the variables, and see if UNIVARIATE will automatically use the labels:

 

label NAME_SURNAME = 'NAME SURNAME';

ballardw
Super User

@chinaski wrote:

Hi,

I want my proc univariate report headings to be seen properly, just like we do in proc print with split="_" option. What is the solution for that. Thanks to anybody that helps.

 

Value NAME_SURNAME FIRM_NAME PRODUCT_NAME

 

i want this to be like this in proc univariate report

 

Value NAME
SURNAME
FIRM
NAME
PRODUCT
NAME

 


Really need to show what Proc Univariate code you are running and indicate which part of the output you expect to appear like that.

Better would be to provide either example input data and the desired result or the desired result of using one of the SAS supplied data sets such as SASHELP.CLASS.

 

By default Univariate generates a fair amount of input and goes up quickly with additional options. I don't think any of the default tables will appear at all similar to what you are showing. So I am not sure exactly what you want to display.

 

 

chinaski
Obsidian | Level 7

ods select extremeobs;
proc univariate data=sasuser.cars;
class make;
var MPG_CITY MPG_HIGHWAY;
id Make Model MPG_City MPG_City;
RUN;

 

Here is the result:

 

The UNIVARIATE Procedure
Variable: MPG_City (MPG (City))
Make = Acura
Extreme Observations
Lowest Highest
Value MPG_City MPG_Highway Make Model Obs Value MPG_City MPG_Highway Make Model Obs
17 17 24 Acura NSX coupe 2dr manual S 7 18 18 24 Acura 3.5 RL 4dr 5
17 17 23 Acura MDX 1 18 18 24 Acura 3.5 RL w/Navigation 4dr 6
18 18 24 Acura 3.5 RL w/Navigation 4dr 6 20 20 28 Acura TL 4dr 4
18 18 24 Acura 3.5 RL 4dr 5 22 22 29 Acura TSX 4dr 3
20 20 28 Acura TL 4dr 4 24 24 31 Acura RSX Type S 2dr 2

 

i want MPG_City and MPG_Highway look like this in the Results section:

 

MPG
City
MPG
Highway

 

 

 

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 730 views
  • 0 likes
  • 3 in conversation