BookmarkSubscribeRSS Feed
Dancreed
Calcite | Level 5

Hi All,

 

I am very new to SAS and still learning so apologies if my question is simple.

 

I have a numeric column (this has to stay numeric) and in that column I have for example:

2

5

7

2.1

3

4

The issue is since I have placed the 2.1 into the mix the list now reads as follows:

2.0

5.0

7.0

2.1

3.0

4.0

 

Is there anyway to remove the 0s!

 

Thanks very much in advance

Dan

3 REPLIES 3
Astounding
PROC Star

If you use the 2. format, you will lose a piece:  2.1 will print as 2 instead.

 

Worth a try: the best3. format.  For example:

 

format varname best3.;

 

I can't test it right now, but if this doesn't work I think the solution becomes more complex.

 

Is there some good reason that you don't want to see the zeros?

MINX
Obsidian | Level 7

Just use best. format

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3642 views
  • 0 likes
  • 4 in conversation