BookmarkSubscribeRSS Feed
sri1
Obsidian | Level 7

Hi ,

 

I have a dataset  as following 

 

   category           s1                      s2                   s3   

    a1                   2(100.0)[4]        3(100.0)[6]      15(100.0)[105]

    a2                   0                       1(33.1)[1]        1(50.0)[1]

    a3                   1(5.9)[1]            0                     0

 

I need as following

 

  category           s1                          s2                        s3   

    a1                   2  (100.0)  [4]      3  (100.0)  [6]      15  (100.0)  [105]

    a2                   0                         1  (  33.1)  [1]       1   (  50.0)   [   1]

    a3                   1  (    5.9)  [1]      0                          0

 

Appreciate your input

 

Thanks

 

1 REPLY 1
ballardw
Super User

Are you going to display this with a monospace font like Courier or the SAS Monospace?

If not you are not going to be happy with the appearance because "spaces" are going to be interpreted differently depending on fonts. If you look closely at your "need" you will see that decimals between the first and second line do not align and the brackets don't either.

 

If the goal is to align things then have 3 separate variables/values that can have style elements attached for possible alignment.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

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