본문 바로가기

SAS/Scenario

Scenario 2

 

 

This scenario uses the Cert.Stree data set. 

Write a SAS program to do the following:

  • Create a new temporary SAS date set uses Cert.Stress and store the results in Work.Stress1.
  • Remove observations with RestHR values that are greater than 70.
  • Create a new variable called TotalTime. The value of TotalTime is the value of TimeMIn multiplied by 60, plus the value of TimeSec.
  • Romove TotalTime values that are less than 600.

 

 

 

[사용 코드]

 

libname cert 'C:/folders/mypath/cert/';

data work.stress1;
set cert.stress;
if RestHR <= 70;
TotalTIme = (TimeMin*60)+Timesec;
if TotalTime < 600 then delete;
run;


proc print data=work.stress1;
run;

 

 

Work.Stress1

'SAS > Scenario' 카테고리의 다른 글

Scenario 4  (0) 2022.12.25
Scenario 3  (0) 2022.12.25
Scenario 1  (0) 2022.12.25
Scenarie 10  (0) 2022.11.06
Scenario 9  (1) 2022.11.06