Hi,
is there an efficient way to exchange all NAs with the respective last non-NA value in a series?
Looping through all elements does not seem too promising from an efficient point of view.
Replace NA with last non-NA value in series
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Replace NA with last non-NA value in series
Code: Select all
x = @recode(x=na, @last(x), x)
Re: Replace NA with last non-NA value in series
great - works! Many thanks.
Who is online
Users browsing this forum: No registered users and 2 guests
