In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
What this article shares with you is about what the missing function is. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article. Let's take a look at it with the editor.
The missing () function is a function used to test missing values.
There is an example in the help documentation that checks for variables that contain missing values:
Data _ null_; input @ 1 var1 3. @ 5 var2 3; if missing (var1) then do; put 'Variable 1 is Missing.'; end; else if missing (var2) then do; put' Variable 2 is Missing.'; end; datalines;127988 195
In addition, we often encounter situations where missing values need to be eliminated, and we are usually used to using if variable=. The statement then delete; is prone to error in many cases.
For example:
Data value; input var1 var2 @ @; if var2=. Then delete; datalines;127 988 195. 122. N; run
If var2=. Results such as then delete will only eliminate missing values. The results obtained are:
Obs var1 var2
1 127 988
2 122 N
If we need to eliminate .n, we can consider the missing () function:
Data value; input var1 var2 @ @; if missing (var2) then delete; datalines;127 988 195. 122. N; run;proc print; run
Results:
Obs var1 var2
1 127 988
The above is what the missing function is, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.