0
data tt;
input init $ ht wt sex $ time @@;
if ht=. then short=' ';
else if ht<170 then short='y';
else short='n';
if wt=. then heavy=' ';
else if wt<80 then heavy='y';
else wt='n';
cards;
qqq 160.4 60.3 m 1 ewe 167.4 81.5 f 3 aqw 168.0 79.34 f 6
ccc 181.4 87.7 m 19
;run;
proc print data=tt;
run;
output s like this
init ht wt sex time short heavy
qqq 160.4 60.3 m 1 y y
ewe 167.4 . f 3 y
aqw 168.0 79.34 f 6 y y
ccc 181.4 . m 19 y`
なぜwt
に欠損値があるのかわかりません。 if wt>80
を入力すると、wt(60.3 and 79.34)
が欠けて、81.5
と87.7
が出力に表示されます。特定の変数のif条件が異なる出力値がありません
最後の行には「短く」と表示されるはずです。私は答えられる言語が分からないが、あなたがそれを見落としているように見えるので、それを指摘している。 – pinkfloydx33