BookmarkSubscribeRSS Feed
Ivy
Quartz | Level 8 Ivy
Quartz | Level 8

 

I would like to try to avoid the warning message:  

 

NOTE: Numeric values have been converted to character values at the places given by:

 

med_range =compress(round(median_,0.1)) || " ("||compress(round(min_,0.1))||"-"||compress(round(max_,0.1))||")";

 

If I use put function to change rouned value to character, what the best format I should use considering the big variance of the date value ?

 

Thank you very much.

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

An example of your data as a datastep would be ideal.  At a guess:

data want;
  set have;
  med_range=cats(put(round(median_,.1),8.1)," (",put(round(min_,.1),8.1),"-",put(round(max_,.1),8.1),")");
run;
Reeza
Super User

Try using a CATT or CATS function instead. They do the conversion and I usually find it easier to read rather than the double pipe. 

You can usually avoid the COMPRESS() as well, since CATT trims variables. 

Ivy
Quartz | Level 8 Ivy
Quartz | Level 8
Thank you very much, RW9 and Reeza, that helps !

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 780 views
  • 0 likes
  • 3 in conversation