Replace NA by 0
Posted: Tue Oct 12, 2010 6:55 am
Hi,
my series contains 1641 observations and some of them are NA-entries. I want to write a program that replaces them by zero. I tried it this way:
for !i = 1 to 1641
if @isna(@elem(series, !i)) then
@elem(series, !i} = 0
endif
next
Unfortunately, my code returns an error message, telling me that "an unnamed object cannot be converted to a string in IF...". What shall I do?
my series contains 1641 observations and some of them are NA-entries. I want to write a program that replaces them by zero. I tried it this way:
for !i = 1 to 1641
if @isna(@elem(series, !i)) then
@elem(series, !i} = 0
endif
next
Unfortunately, my code returns an error message, telling me that "an unnamed object cannot be converted to a string in IF...". What shall I do?