NA DATA handling

For questions and discussion related to reading in and working with data.

NA DATA handling

Postby sportsguy » Tue Dec 29, 2009 2:01 pm

How do I identify an NA in a data series, such that %IF(Symbol == NA, new value, existing value)
primary use is to assign data to holiday dates without programming the data prior to importing into rats

thanks

sportsguy
sportsguy
 
Posts: 2
Joined: Sun Nov 01, 2009 12:01 pm

Re: NA DATA handling

Postby TomDoan » Tue Dec 29, 2009 3:05 pm

How do I identify an NA in a data series, such that %IF(Symbol == NA, new value, existing value)
primary use is to assign data to holiday dates without programming the data prior to importing into rats

thanks

sportsguy


Use %VALID(Symbol) to test whether a value is NA or not. (It returns 1 if it's not missing). So something like

Code: Select all
SET PATCH = %IF(%VALID(SYMBOL),existing value,new value)


would be what you want.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to Data: Reading, Writing, Transforming

Who is online

Users browsing this forum: No registered users and 1 guest

cron