[R] replacing Na's in a vector with the preceding integer element
rv15i at yahoo.se
Thu Nov 13 18:07:35 CET 2008
I have a vector where an integer is followed by a randomly varying number of NA elements. I want to replace the NA's with the preceding integer. Let me explain with a simple example :
I want to get the following vector from a :
How can I do this with R? Will appreciate all the help that I can get.
More information about the R-help