BookmarkSubscribeRSS Feed
thanikondharish
Calcite | Level 5

I know compress function and its modifiers like 'kp' 'ka' 'kd' , but couldn't find difference in below program what will happen if I run below program?

data t ;

name='jhon peter' ;

a=compress(name,,'r') ;

run;

5 REPLIES 5
thanikondharish
Calcite | Level 5

(duplicate of later post)

DanielLangley
Quartz | Level 8
I couldn't test it but it doesn't look like it will do anything.
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm
The documentation shows the different modifiers and it doesn't look like 'r' is a modifier.
Cynthia_sas
SAS Super FREQ

Hi:

You are correct, the R is not a modifier. This is what happens:

compress_r.png

  Perhaps the OP could clarify what the desired output was going to be using 'R' in the COMPRESS Function.

 

Cynthia

kiranv_
Rhodochrosite | Level 12

nothing happens,

to compress r use in second argument.

 

find the documentation what are allowed in modifiers(third argument) and r is not of them. it generally looking for groups of letter like alphabets(a) digits(d) etc

 

http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000212246.htm

 

data t ;

name='jhon peter' ;

a=compress(name,'r') ;

run;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 5 replies
  • 1282 views
  • 1 like
  • 5 in conversation