How to delete missing values marked as 'NA' of multiple character variables at one go

Reply
Occasional Contributor
Posts: 6

How to delete missing values marked as 'NA' of multiple character variables at one go

Hi,

 

How to delete missing values marked as 'NA' of multiple character variables at one go?

 

Thanks!!

Respected Advisor
Posts: 4,606

Re: How to delete missing values marked as 'NA' of multiple character variables at one go

If what you want to delete are the values and not the variables : use an array of all character variables

 

array _c _character_;

do i = 1 to dim(_c);
	if _c{i} = "NA" then _c{i} = .;
	end;
	
drop i;
PG
Ask a Question
Discussion stats
  • 1 reply
  • 186 views
  • 0 likes
  • 2 in conversation