Subscribe Bookmark RSS Feed

How to prevent NA being treated as Missing Value Code by column compression?

rijking

Community Trekker

Joined:

Apr 18, 2016

I have a large JSL script that uses column compression several times to keep file sizes managable: 

dt << Compress Selected Columns();

My issue is that for columns (both ordinal and nominal) where I have values such as "a","b","c","d","NA", the compression function removes the "NA" values, I assume because it treats them as a Missing Value Code. However, I require the "NA" to remain as it is used in subsequent functions. How can I prevent this, whilst still running the compression?

 

Many thanks

2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Look in column info for the missing value codes and remove NA
Jim
rijking

Community Trekker

Joined:

Apr 18, 2016

@txnelson Thanks, but NA isn't listed as a missing value code in column info for at least some of the relevant columns. As I'm creating a large number of columns with JSL it's not practical to manually check/adjust each. Can this be scripted or can missing value codes be globally defined using JSL?