Hi
i have a table of variables with values missing for some and not missing for some.how to get not missing of these values for all rows.
subject | SODIUM_NLOW_VA | SODIUM_NHIGH_VA | POTASSIU_NLOW_VA | POTASSIU_NHIGH_VA | CARBDIOX_NHIGH_VA | CHLORIDE_NLOW_VA | CHLORIDE_NHIGH_VA | CARBDIOX_NLOW_VA |
1330 | 20 | 18 | ||||||
1330 | 50 | 30 | ||||||
1330 | 50 | 30 | ||||||
1330 | ||||||||
1330 | 20 | 15 | ||||||
1233 | 80 | 63 | ||||||
1233 | 80 | 63 | ||||||
1233 | ||||||||
1233 | ||||||||
1233 | 53 | 23 | ||||||
1233 | 53 | 23 | ||||||
1233 |
thanks in advance
What do you expect as result? One observation for each "subject" with all not missing values?
this how the output should look like
subject | SODIUM_NLOW_VA | SODIUM_NHIGH_VA | POTASSIU_NLOW_VA | POTASSIU_NHIGH_VA | CARBDIOX_NHIGH_VA | CHLORIDE_NLOW_VA | CHLORIDE_NHIGH_VA | CARBDIOX_NLOW_VA |
1330 | 50 | 30 | 20 | 18 | ||||
1330 | 50 | 30 | 20 | 15 | ||||
1330 | 80 | 63 | ||||||
1330 | 80 | 63 | ||||||
1330 | 53 | 23 | ||||||
1233 | 53 | 23 |
Why should the two first obs of POTASSIU_NLOW_VA still be missing? Please provide a clear logic.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.