Finding second non missing value in an observation in SAS using arrays.

preview_player
Показать описание
data and code to practice this tutorial is given in the link below.
Please use the code if count=2 then newvar=ch(i); instead of if count=2 then do; newvar=ch(i); leave; end;
Рекомендации по теме
Комментарии
Автор

Thank you for creating video on concept and logic.

ajaykushwaha
Автор

Thankyou so much for all your videos...they are really very helpful and on important concepts

abhishekdixit
Автор

Really great video.... great work...
Really helps some people 👍🙏❤️

sagarmandal
Автор

It's just a coincidence that yesterday I saw some of your videos..proc append vs sql insert is one of them and today in interview 2 questions were there based on proc append❤

abhishekdixit
Автор

Thank you for clear explanation.


Can please make a video for merge concepts and set

Difference between merge and set with an example

sureshnagumalli
Автор

IN THE FIRST ITERATION END OF DO LOOP COUNT HAVE VALUE 2 AND LEAVING FROM DO LOOP RIGHT AND THEN FOR SECOND ROW YOU NEED TO START FROM COUNT=0 ...EVERYTIME COUNT STARTS NEED TO START WITH 0 WHERE IT IS MENTIONED IN CODE

manikantach
Автор

I know this video is 3 years old, but I only just recently saw it (randomly looking for tips and tricks in SAS). The 2nd version of the code will not work; there is a logic flaw. The value for NEWVAR in obs 4 will be null. For the 4th iteration, the COUNT variable will still have a value of 2, and it will meet the condition of setting NEWVAR to MONTH4, overwriting the original 'C' from MONTH3. The original version of the code is the correct way. Just thought I'd mention that in case anyone else is still watching this in 2024.

HitmanPSN
Автор

Thanks for this..can u make a video on joins ??

namanverma
Автор

I have one question.

Problem definition

X is having char and num value.
we have to pic char value and put in separate column Y and num
is separate column Z.

How can we do it ?

Example below.


x y z

a a
s s
14 14
56 56
r5 r5
g g
h h
4 4
3 3
a10 a10

ajaykushwaha-jemw
visit shbcf.ru