Go Back   Rhinocerus > Newsgroup > Newsgroup comp.soft-sys.sas

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 11-07-2008, 10:06 PM
Howard Schreier
Guest
 
Posts: n/a
Default Re: Data step asterisk

On Fri, 7 Nov 2008 10:55:40 -0500, Toby Dunn <tobydunn@HOTMAIL.COM> wrote:

>Ryan ,
>
>Much depends on what you are trying to do, are you trying to put the
>asterisk in the value of the variable, are you trying to put it next to
>the value when you writ eit out to the log or some report?
>
>Perhaps this will get you a littl efurther along:
>
>Data One ;
>SBP = 100 ;
>Output ;
>SBP = 166 ;
>Output ;
>SBP = 111 ;
>Output ;
>SBP = 169 ;
>Output ;
>Run ;
>
>Data _Null_ ;
>Set One ;
>
>If SBP > 164 Then Put SBP= +(-1) '*' ;
>Else Put SBP= ;
>Run ;


Or, if so inclined, put the conditionality inside a single PUT statement:

Data _Null_ ;
Set One ;
Put SBP= +(-1) '*' +( (SBP > 164) -1 ) ' ';
Run ;

>
>
>On Fri, 7 Nov 2008 01:23:56 -0500, Ryan Richmond
><ryan.s.richmond@WMICH.EDU> wrote:
>
>>I would like to put an asterisk next to selected observations with an if/
>>then statement. So far, I'm not getting it to work out.
>>
>>data PBlood;
>> set BloodP;
>> if SBP>164 then put '*';
>>
>>Thanks, Ryan.

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Basic matrix operations in data steps and procedures Dale McLerran Newsgroup comp.soft-sys.sas 0 12-12-2008 12:37 AM
Re: Question about efficient data extraction Paul Dorfman Newsgroup comp.soft-sys.sas 0 06-05-2008 04:20 AM
Data Entry Online, Data Format, Data Conversion and Data EntryServices through Data Entry Outsourcing Data Entry Outsourcing Newsgroup comp.soft-sys.sas 0 03-20-2008 12:00 PM
Re: Slpit data Paul M. Dorfman Newsgroup comp.soft-sys.sas 0 08-29-2005 04:41 AM
Re: A case when the location of a format statement in a data step Michael S. Zdeb Newsgroup comp.soft-sys.sas 0 07-07-2005 01:28 PM



All times are GMT. The time now is 12:50 PM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.