BookmarkSubscribeRSS Feed

欠損値を0に置き換える

Started ‎03-03-2019 by
Modified ‎03-03-2019 by
Views 1,811

質問

任意の数値変数の値が欠損値のときに、0に置き換えるにはどうすれば良いですか。

 

回答

欠損値は、プログラムでは「.(ピリオド)」で表せます。

 

次の例は、a1が欠損値のとき0に置き換えるサンプルプログラムです。

 

<サンプルプログラム>

data a;
   set a; 
   if a1 = . then  a1 = 0; 
run;

 

Version history
Last update:
‎03-03-2019 09:00 PM
Updated by:
Contributors

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

Article Labels
Article Tags

SAS Support Communitiesのユーザーガイドライン


コミュニティの基本的なガイドラインについてご説明します。まずは、こちらをご参照ください。

詳細を読む

 

SAS Support CommunitiesのFAQ


SAS Support CommunitiesのFAQはヘルプに記載されています。参照方法は、こちらからご確認ください。

詳細を読む

 

質問や意見の投稿と返信方法について


Japan SAS Discussionページに質問や意見(メッセージ)を投稿/返信する方法を簡単にご説明します。

詳細を読む