BookmarkSubscribeRSS Feed

欠損値を0に置き換える

Started ‎03-03-2019 by
Modified ‎03-03-2019 by
Views 2,112

質問

任意の数値変数の値が欠損値のときに、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

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Article Labels
Article Tags

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


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

詳細を読む

 

SAS Support CommunitiesのFAQ


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

詳細を読む

 

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


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

詳細を読む

OSZAR »